mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +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.
17 lines
391 B
Swift
17 lines
391 B
Swift
// RUN: %target-swift-frontend -primary-file %s -emit-ir %S/Inputs/rdar48049725_other.swift | %FileCheck %s
|
|
public protocol P3 {
|
|
associatedtype A1: SomeClass
|
|
}
|
|
|
|
|
|
public protocol P2 {
|
|
associatedtype A2: P3
|
|
}
|
|
|
|
|
|
func test<T: P5>(value: T) {
|
|
// Ensure that we get the right generic signature for Foo.f
|
|
// CHECK: call swiftcc void @"$s12rdar480497253FooV1fyyxAA2P5RzlFZ"
|
|
Foo.f(value)
|
|
}
|