mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[IRGen] Always get the CanType of a conformance's contextual type (#14928)
The conformance type's contextual type might not be canonical, such as in the case of substituting a `typealias` type for a generic placeholder, so ensure we get the canonical type for the conformance.
This commit is contained in:
committed by
Jordan Rose
parent
2380950fa7
commit
31a2bc7bfc
@@ -1210,7 +1210,8 @@ public:
|
||||
ConcreteType(SILWT->getConformance()->getDeclContext()
|
||||
->mapTypeIntoContext(
|
||||
SILWT->getConformance()->getType()
|
||||
->getCanonicalType())),
|
||||
->getCanonicalType())
|
||||
->getCanonicalType()),
|
||||
Conformance(*SILWT->getConformance()),
|
||||
SILEntries(SILWT->getEntries()),
|
||||
SILConditionalConformances(SILWT->getConditionalConformances()),
|
||||
|
||||
@@ -323,3 +323,11 @@ public func double_concrete_concrete() {
|
||||
func dynamicCastToP1(_ value: Any) -> P1? {
|
||||
return value as? P1
|
||||
}
|
||||
|
||||
protocol P4 {}
|
||||
typealias P4Typealias = P4
|
||||
protocol P5 {}
|
||||
|
||||
struct SR7101<T> {}
|
||||
extension SR7101 : P5 where T == P4Typealias {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user