mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
We generated a mix of "inferred" and "nested type name match" constraints for the case where we had two nested types with the same name and inferred that they are equal. Make them consistent by always using nested type name match constraints. This fixes a bug where we would get different canonical generic signatures in different source files because we inferred the same-type constraint with different requirement sources. Fixes rdar://problem/48049725.
18 lines
215 B
Swift
18 lines
215 B
Swift
public protocol P1 {
|
|
associatedtype A1: SomeClass
|
|
}
|
|
|
|
public protocol P4: P2 where A2: P1 {}
|
|
|
|
|
|
public class SomeClass { }
|
|
|
|
protocol P5 {
|
|
associatedtype A3: P4
|
|
}
|
|
|
|
struct Foo {
|
|
static func f<T: P5>(_: T) {
|
|
}
|
|
}
|