@@ -7,11 +7,11 @@ func takeDoubleAndBool(_: Double, _: Bool) { }
7
7
8
8
func testTernaryOneWay( b: Bool , b2: Bool ) {
9
9
// CHECK: ---Connected components---
10
- // CHECK-NEXT: 3: $T10 depends on 1
11
- // CHECK-NEXT: 1: $T5 $T8 $T9 depends on 0, 2
12
- // CHECK-NEXT: 2: $T7
13
- // CHECK-NEXT: 0: $T4
14
- // CHECK-NEXT: 4: $T11 $T13 $T14
10
+ // CHECK-NEXT: 3: $T{{[0-9]+}} depends on 1
11
+ // CHECK-NEXT: 1: $T{{[0-9]+}} $T{{[0-9]+}} $T{{[0-9]+}} depends on 0, 2
12
+ // CHECK-NEXT: 2: $T{{[0-9]+}}
13
+ // CHECK-NEXT: 0: $T{{[0-9]+}}
14
+ // CHECK-NEXT: 4: $T{{[0-9]+}} $T{{[0-9]+}} $T{{[0-9]+}}
15
15
takeDoubleAndBool (
16
16
Builtin . one_way (
17
17
b ? Builtin . one_way ( 3.14159 ) : Builtin . one_way ( 2.71828 ) ) ,
@@ -23,22 +23,35 @@ func int8Or16(_ x: Int16) -> Int16 { return x }
23
23
24
24
func testTernaryOneWayOverload( b: Bool ) {
25
25
// CHECK: ---Connected components---
26
- // CHECK: 1: $T5 $T10 $T11 depends on 0, 2
27
- // CHECK: 2: $T7 $T8 $T9
28
- // CHECK: 0: $T2 $T3 $T4
26
+ // CHECK: 1: [[A:\$T[0-9]+]] [[B:\$T[0-9]+]] [[C:\$T[0-9]+]] depends on 0, 2
27
+ // CHECK: 2: $T{{[0-9]+}} $T{{[0-9]+}} $T{{[0-9]+}}
28
+ // CHECK: 0: $T{{[0-9]+}} $T{{[0-9]+}} $T{{[0-9]+}}
29
29
30
30
// CHECK: solving component #1
31
- // CHECK: (attempting type variable $T11 := Int8
31
+ // CHECK: (attempting type variable [[C]] := Int8
32
32
33
33
// CHECK: solving component #1
34
- // CHECK: (attempting type variable $T11 := Int8
34
+ // CHECK: (attempting type variable [[C]] := Int8
35
35
36
36
// CHECK: solving component #1
37
- // CHECK: (attempting type variable $T11 := Int8
37
+ // CHECK: (attempting type variable [[C]] := Int8
38
38
39
39
// CHECK: solving component #1
40
- // CHECK: (attempting type variable $T11 := Int8
41
- // CHECK: (found solution: [component: non-default literal(s), value: 2] [component: use of overloaded unapplied function(s), value: 2])
40
+ // CHECK: (attempting type variable [[C]] := Int8
41
+ // CHECK: (considering -> [[A]] conv [[C]]
42
+ // CHECK: (removed constraint: [[A]] conv [[C]]
43
+ // CHECK: (outcome: simplified)
44
+ // CHECK: )
45
+ // CHECK: (considering -> [[B]] conv [[C]]
46
+ // CHECK: (removed constraint: [[B]] conv [[C]]
47
+ // CHECK: (outcome: simplified)
48
+ // CHECK: )
49
+ // CHECK: (considering -> [[C]] conv Int8
50
+ // CHECK: > [[B]] conv [[C]]
51
+ // CHECK: > [[C]] conv Int8
52
+ // CHECK: )
53
+ // CHECK: )
54
+ // CHECK: (found solution: [component: non-default literal(s), value: 2] [component: use of overloaded unapplied function(s), value: 2])
42
55
43
56
// CHECK: (composed solution: [component: non-default literal(s), value: 2] [component: use of overloaded unapplied function(s), value: 2])
44
57
// CHECK-NOT: (composed solution: [component: non-default literal(s), value: 2] [component: use of overloaded unapplied function(s), value: 2])
0 commit comments