File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ public struct TestError: Error {
23
23
24
24
@inline ( never)
25
25
@_optimize ( none)
26
- internal func internalImplementation( somethingGood: Bool ) -> Result < Int , TestError > {
26
+ internal func internalImplementation( somethingGood: Bool ) -> Result < Int , any Error > {
27
27
return somethingGood ? . success( 27 ) : . failure( TestError ( errno: 123 ) )
28
28
}
29
29
@@ -32,12 +32,11 @@ public func publicWrapper(somethingGood: Bool) throws -> Int {
32
32
}
33
33
34
34
// CHECK-LABEL: sil [noinline] @$s4test0A13WithForceCast13somethingGoodSiSb_tF
35
- // CHECK: [[F:%[0-9]+]] = function_ref @$s4test22internalImplementation13somethingGoods6ResultOySiAA9TestErrorVGSb_tF
35
+ // CHECK: [[F:%[0-9]+]] = function_ref @$s4test22internalImplementation13somethingGoods6ResultOySis5Error_pGSb_tF
36
36
// CHECK: apply [[F]]
37
37
// CHECK: switch_enum
38
38
// CHECK: bb1:
39
39
// CHECK-NOT: alloc_existential_box
40
- // CHECK-NOT: apply
41
40
// CHECK: } // end sil function '$s4test0A13WithForceCast13somethingGoodSiSb_tF'
42
41
@inline ( never)
43
42
public func testWithForceCast( somethingGood: Bool ) -> Int {
@@ -49,12 +48,11 @@ public func testWithForceCast(somethingGood: Bool) -> Int {
49
48
}
50
49
51
50
// CHECK-LABEL: sil [noinline] @$s4test0A19WithMultipleCatches13somethingGoodSiSb_tF
52
- // CHECK: [[F:%[0-9]+]] = function_ref @$s4test22internalImplementation13somethingGoods6ResultOySiAA9TestErrorVGSb_tF
51
+ // CHECK: [[F:%[0-9]+]] = function_ref @$s4test22internalImplementation13somethingGoods6ResultOySis5Error_pGSb_tF
53
52
// CHECK: apply [[F]]
54
53
// CHECK: switch_enum
55
54
// CHECK: bb1:
56
55
// CHECK-NOT: alloc_existential_box
57
- // CHECK-NOT: apply
58
56
// CHECK: } // end sil function '$s4test0A19WithMultipleCatches13somethingGoodSiSb_tF'
59
57
@inline ( never)
60
58
public func testWithMultipleCatches( somethingGood: Bool ) -> Int {
You can’t perform that action at this time.
0 commit comments