mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
It's not correct to drop a constraint if one of the two types structurally contains generic parameters at the method depth.
10 lines
204 B
Swift
10 lines
204 B
Swift
// RUN: %target-swift-frontend -primary-file %s -emit-ir
|
|
|
|
struct First<T> {}
|
|
struct Second<T> {}
|
|
|
|
struct Node<T> {
|
|
func create<U>() where T == First<U> { }
|
|
func create<U>() where T == Second<U> { }
|
|
}
|