7
7
// RUN: %FileCheck %s --input-file %t/ConditionalConformance.symbols.json --check-prefix=CONFORMS
8
8
// RUN: %FileCheck %s --input-file %t/ConditionalConformance.symbols.json --check-prefix=MEMBER
9
9
10
- // RUN: %FileCheck %s --input-file %t/
[email protected] --check-prefixes=SYNTHEXT
,EBSOff_SYNTHEXT
11
- // RUN: %FileCheck %s --input-file %t/
[email protected] --check-prefixes=CONFORMSEXT
,EBSOff_CONFORMSEXT
12
- // RUN: %FileCheck %s --input-file %t/
[email protected] --check-prefixes=MEMBEREXT
,EBSOff_MEMBEREXT
10
+ // RUN: %FileCheck %s --input-file %t/
[email protected] --check-prefixes=SYNTHEXT
-DEXTID=s:Sa
11
+ // RUN: %FileCheck %s --input-file %t/
[email protected] --check-prefixes=CONFORMSEXT
-DEXTID=s:Sa
12
+ // RUN: %FileCheck %s --input-file %t/
[email protected] --check-prefixes=MEMBEREXT
-DEXTID=s:Sa
13
13
14
14
// RUN: %empty-directory(%t)
15
15
// RUN: %target-build-swift %s -module-name ConditionalConformance -emit-module -emit-module-path %t/
20
20
// RUN: %FileCheck %s --input-file %t/ConditionalConformance.symbols.json --check-prefix=CONFORMS
21
21
// RUN: %FileCheck %s --input-file %t/ConditionalConformance.symbols.json --check-prefix=MEMBER
22
22
23
- // RUN: %FileCheck %s --input-file %t/
[email protected] --check-prefixes=SYNTHEXT
,EBSOn_SYNTHEXT
24
- // RUN: %FileCheck %s --input-file %t/
[email protected] --check-prefixes=CONFORMSEXT
,EBSOn_CONFORMSEXT
25
- // RUN: %FileCheck %s --input-file %t/
[email protected] --check-prefixes=MEMBEREXT
,EBSOn_MEMBEREXT
23
+ // RUN: %FileCheck %s --input-file %t/
[email protected] --check-prefixes=SYNTHEXT
-DEXTID=s:e:s:Sa22ConditionalConformanceSiRszlE3baryyF
24
+ // RUN: %FileCheck %s --input-file %t/
[email protected] --check-prefixes=CONFORMSEXT
-DEXTID=s:e:s:Sa22ConditionalConformanceSiRszlE3baryyF
25
+ // RUN: %FileCheck %s --input-file %t/
[email protected] --check-prefixes=MEMBEREXT
-DEXTID=s:e:s:Sa22ConditionalConformanceSiRszlE3baryyF
26
26
27
27
// Relationships to Swift.Array should only go into the @Swift file.
28
28
// C\HECK-NOT: "s:Sa"
@@ -42,10 +42,9 @@ public struct S<T> {
42
42
}
43
43
}
44
44
45
- // CONFORMS: "kind": "conformsTo"
46
- // CONFORMS-NEXT: "source": "s:22ConditionalConformance1SV"
47
- // CONFORMS-NEXT: "target": "s:22ConditionalConformance1PP"
48
- // CONFORMS-NEXT: swiftConstraints
45
+ // S<Int> will also have synthesized conformances to Copyable and Escapable, so match multiple lines
46
+ // at once to make sure we only find the conformance we want to see
47
+ // CONFORMS: "kind": "conformsTo"{{.*[[:space:]].*}} "source": "s:22ConditionalConformance1SV"{{.*[[:space:]].*}} "target": "s:22ConditionalConformance1PP"{{.*[[:space:]].*}} "swiftConstraints"
49
48
// CONFORMS: "kind": "sameType"
50
49
// CONFORMS-NEXT: "lhs": "T"
51
50
// CONFORMS-NEXT: "rhs": "Int"
@@ -61,22 +60,16 @@ extension S: P where T == Int {
61
60
}
62
61
}
63
62
64
- // CONFORMSEXT: "kind": "conformsTo"
65
- // EBSOff_CONFORMSEXT-NEXT: "source": "s:Sa"
66
- // EBSOn_CONFORMSEXT-NEXT: "source": "s:e:s:Sa22ConditionalConformanceSiRszlE3baryyF"
67
- // CONFORMSEXT-NEXT: "target": "s:22ConditionalConformance1PP"
68
- // CONFORMSEXT-NEXT: swiftConstraints
63
+ // CONFORMSEXT: "kind": "conformsTo"{{.*[[:space:]].*}} "source": "[[EXTID]]"{{.*[[:space:]].*}} "target": "s:22ConditionalConformance1PP"{{.*[[:space:]].*}} "swiftConstraints"
69
64
// CONFORMSEXT: "kind": "sameType"
70
65
// CONFORMSEXT-NEXT: "lhs": "Element"
71
66
// CONFORMSEXT-NEXT: "rhs": "Int"
72
67
73
68
extension Array : P where Element == Int {
74
69
// SYNTHEXT: "source": "s:22ConditionalConformance1PPAAE3fooyyF::SYNTHESIZED::s:Sa"
75
- // EBSOff_SYNTHEXT-NEXT: "target": "s:Sa"
76
- // EBSOn_SYNTHEXT-NEXT: "target": "s:e:s:Sa22ConditionalConformanceSiRszlE3baryyF"
70
+ // SYNTHEXT-NEXT: "target": "[[EXTID]]"
77
71
78
72
// MEMBEREXT: "source": "s:Sa22ConditionalConformanceSiRszlE3baryyF"
79
- // EBSOff_MEMBEREXT-NEXT: "target": "s:Sa"
80
- // EBSOn_MEMBEREXT-NEXT: "target": "s:e:s:Sa22ConditionalConformanceSiRszlE3baryyF"
73
+ // MEMBEREXT-NEXT: "target": "[[EXTID]]"
81
74
public func bar( ) { }
82
75
}
0 commit comments