-
Notifications
You must be signed in to change notification settings - Fork 10.4k
/
Copy pathwitness_specialize.sil
27 lines (21 loc) · 1.02 KB
/
witness_specialize.sil
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// RUN: %target-sil-opt %s -module-name=witness_specialize | %target-sil-opt -module-name=witness_specialize | %FileCheck %s
sil_stage raw
protocol AssocReqt {
func requiredMethod()
}
struct GenericAssocType<T> : AssocReqt {
func requiredMethod()
}
protocol AssocTypeWithReqt {
associatedtype AssocType : AssocReqt
}
struct ConformsWithDependentAssocType2<DD> : AssocTypeWithReqt {
typealias AssocType = GenericAssocType<DD>
}
// CHECK-LABEL: sil_witness_table <DD> ConformsWithDependentAssocType2<DD>: AssocTypeWithReqt module
// CHECK: associated_type AssocType: GenericAssocType<DD>
// CHECK: associated_conformance (AssocType: AssocReqt): GenericAssocType<DD>: specialize <DD> (<T> GenericAssocType<T>: AssocReqt module
sil_witness_table <DD> ConformsWithDependentAssocType2<DD>: AssocTypeWithReqt module witness_specialize {
associated_type AssocType: GenericAssocType<DD>
associated_conformance (AssocType: AssocReqt): GenericAssocType<DD>: specialize <DD> (<T> GenericAssocType<T>: AssocReqt module witness_specialize)
}