|
1 | 1 | // RUN: %target-swift-emit-silgen -parse-as-library %s | %FileCheck %s
|
2 | 2 |
|
3 | 3 | enum PartialApplyEnumPayload<T, U> {
|
4 |
| - case Left(T) |
5 |
| - case Both(T, U) |
| 4 | + case left(T) |
| 5 | + case both(T, U) |
6 | 6 |
|
7 |
| - case LeftWithLabel(left: T) |
8 |
| - case BothWithLabel(left: T, right: U) |
| 7 | + case leftWithLabel(left: T) |
| 8 | + case bothWithLabel(left: T, right: U) |
9 | 9 |
|
10 |
| - case TupleWithLabel(both: (T, U)) |
| 10 | + case tupleWithLabel(both: (T, U)) |
11 | 11 |
|
12 | 12 | // Note: SILGen can emit these thunks correctly, but we disabled
|
13 | 13 | // the feature since calling the constructor directly (without a
|
14 | 14 | // thunk) doesn't work yet.
|
15 |
| - /* case Variadic(_: Int...) |
16 |
| - case VariadicWithLabel(indices: Int...) |
17 |
| - case VariadicTuple(_: (Int, Int)...) |
18 |
| - case VariadicWithOther(String, _: Int...) */ |
| 15 | + /* case variadic(_: Int...) |
| 16 | + case variadicWithLabel(indices: Int...) |
| 17 | + case variadicTuple(_: (Int, Int)...) |
| 18 | + case variadicWithOther(String, _: Int...) */ |
19 | 19 |
|
20 |
| - case Autoclosure(@autoclosure () -> ()) |
| 20 | + case autoclosure(@autoclosure () -> ()) |
21 | 21 | }
|
22 | 22 |
|
23 | 23 | struct S {}
|
24 | 24 | struct C {}
|
25 | 25 |
|
26 | 26 | func partialApplyEnumCases(_ x: S, y: C) {
|
27 |
| - _ = PartialApplyEnumPayload<S, C>.Left |
28 |
| - _ = PartialApplyEnumPayload<S, C>.Both |
29 |
| - _ = PartialApplyEnumPayload<S, C>.LeftWithLabel |
30 |
| - _ = PartialApplyEnumPayload<S, C>.TupleWithLabel |
31 |
| - /* _ = PartialApplyEnumPayload<S, C>.Variadic |
32 |
| - _ = PartialApplyEnumPayload<S, C>.VariadicWithLabel |
33 |
| - _ = PartialApplyEnumPayload<S, C>.VariadicTuple |
34 |
| - _ = PartialApplyEnumPayload<S, C>.VariadicWithOther */ |
35 |
| - _ = PartialApplyEnumPayload<S, C>.Autoclosure |
| 27 | + _ = PartialApplyEnumPayload<S, C>.left |
| 28 | + _ = PartialApplyEnumPayload<S, C>.both |
| 29 | + _ = PartialApplyEnumPayload<S, C>.leftWithLabel |
| 30 | + _ = PartialApplyEnumPayload<S, C>.tupleWithLabel |
| 31 | + /* _ = PartialApplyEnumPayload<S, C>.variadic |
| 32 | + _ = PartialApplyEnumPayload<S, C>.variadicWithLabel |
| 33 | + _ = PartialApplyEnumPayload<S, C>.variadicTuple |
| 34 | + _ = PartialApplyEnumPayload<S, C>.variadicWithOther */ |
| 35 | + _ = PartialApplyEnumPayload<S, C>.autoclosure |
36 | 36 | }
|
37 | 37 |
|
38 |
| -// CHECK-LABEL: sil shared [transparent] [thunk] [ossa] @$s17enum_curry_thunks23PartialApplyEnumPayloadO4LeftyACyxq_GxcAEmr0_lFTc : $@convention(thin) <T, U> (@thin PartialApplyEnumPayload<T, U>.Type) -> @owned @callee_guaranteed (@in_guaranteed T) -> @out PartialApplyEnumPayload<T, U> { |
39 |
| -// CHECK-LABEL: sil shared [transparent] [ossa] @$s17enum_curry_thunks23PartialApplyEnumPayloadO4LeftyACyxq_GxcAEmr0_lF : $@convention(method) <T, U> (@in T, @thin PartialApplyEnumPayload<T, U>.Type) -> @out PartialApplyEnumPayload<T, U> { |
| 38 | +// CHECK-LABEL: sil shared [transparent] [thunk] [ossa] @$s17enum_curry_thunks23PartialApplyEnumPayloadO4leftyACyxq_GxcAEmr0_lFTc : $@convention(thin) <T, U> (@thin PartialApplyEnumPayload<T, U>.Type) -> @owned @callee_guaranteed (@in_guaranteed T) -> @out PartialApplyEnumPayload<T, U> { |
| 39 | +// CHECK-LABEL: sil shared [transparent] [ossa] @$s17enum_curry_thunks23PartialApplyEnumPayloadO4leftyACyxq_GxcAEmr0_lF : $@convention(method) <T, U> (@in T, @thin PartialApplyEnumPayload<T, U>.Type) -> @out PartialApplyEnumPayload<T, U> { |
40 | 40 |
|
41 |
| -// CHECK-LABEL: sil shared [transparent] [thunk] [ossa] @$s17enum_curry_thunks23PartialApplyEnumPayloadO4BothyACyxq_Gx_q_tcAEmr0_lFTc : $@convention(thin) <T, U> (@thin PartialApplyEnumPayload<T, U>.Type) -> @owned @callee_guaranteed (@in_guaranteed T, @in_guaranteed U) -> @out PartialApplyEnumPayload<T, U> { |
42 |
| -// CHECK-LABEL: sil shared [transparent] [ossa] @$s17enum_curry_thunks23PartialApplyEnumPayloadO4BothyACyxq_Gx_q_tcAEmr0_lF : $@convention(method) <T, U> (@in T, @in U, @thin PartialApplyEnumPayload<T, U>.Type) -> @out PartialApplyEnumPayload<T, U> { |
| 41 | +// CHECK-LABEL: sil shared [transparent] [thunk] [ossa] @$s17enum_curry_thunks23PartialApplyEnumPayloadO4bothyACyxq_Gx_q_tcAEmr0_lFTc : $@convention(thin) <T, U> (@thin PartialApplyEnumPayload<T, U>.Type) -> @owned @callee_guaranteed (@in_guaranteed T, @in_guaranteed U) -> @out PartialApplyEnumPayload<T, U> { |
| 42 | +// CHECK-LABEL: sil shared [transparent] [ossa] @$s17enum_curry_thunks23PartialApplyEnumPayloadO4bothyACyxq_Gx_q_tcAEmr0_lF : $@convention(method) <T, U> (@in T, @in U, @thin PartialApplyEnumPayload<T, U>.Type) -> @out PartialApplyEnumPayload<T, U> { |
43 | 43 |
|
44 |
| -// CHECK-LABEL: sil shared [transparent] [thunk] [ossa] @$s17enum_curry_thunks23PartialApplyEnumPayloadO13LeftWithLabelyACyxq_Gx_tcAEmr0_lFTc : $@convention(thin) <T, U> (@thin PartialApplyEnumPayload<T, U>.Type) -> @owned @callee_guaranteed (@in_guaranteed T) -> @out PartialApplyEnumPayload<T, U> { |
45 |
| -// CHECK-LABEL: sil shared [transparent] [ossa] @$s17enum_curry_thunks23PartialApplyEnumPayloadO13LeftWithLabelyACyxq_Gx_tcAEmr0_lF : $@convention(method) <T, U> (@in T, @thin PartialApplyEnumPayload<T, U>.Type) -> @out PartialApplyEnumPayload<T, U> { |
| 44 | +// CHECK-LABEL: sil shared [transparent] [thunk] [ossa] @$s17enum_curry_thunks23PartialApplyEnumPayloadO13leftWithLabelyACyxq_Gx_tcAEmr0_lFTc : $@convention(thin) <T, U> (@thin PartialApplyEnumPayload<T, U>.Type) -> @owned @callee_guaranteed (@in_guaranteed T) -> @out PartialApplyEnumPayload<T, U> { |
| 45 | +// CHECK-LABEL: sil shared [transparent] [ossa] @$s17enum_curry_thunks23PartialApplyEnumPayloadO13leftWithLabelyACyxq_Gx_tcAEmr0_lF : $@convention(method) <T, U> (@in T, @thin PartialApplyEnumPayload<T, U>.Type) -> @out PartialApplyEnumPayload<T, U> { |
46 | 46 |
|
47 |
| -// CHECK-LABEL: sil shared [transparent] [thunk] [ossa] @$s17enum_curry_thunks23PartialApplyEnumPayloadO14TupleWithLabelyACyxq_Gx_q_t_tcAEmr0_lFTc : $@convention(thin) <T, U> (@thin PartialApplyEnumPayload<T, U>.Type) -> @owned @callee_guaranteed (@in_guaranteed T, @in_guaranteed U) -> @out PartialApplyEnumPayload<T, U> { |
48 |
| -// CHECK-LABEL: sil shared [transparent] [ossa] @$s17enum_curry_thunks23PartialApplyEnumPayloadO14TupleWithLabelyACyxq_Gx_q_t_tcAEmr0_lF : $@convention(method) <T, U> (@in T, @in U, @thin PartialApplyEnumPayload<T, U>.Type) -> @out PartialApplyEnumPayload<T, U> { |
| 47 | +// CHECK-LABEL: sil shared [transparent] [thunk] [ossa] @$s17enum_curry_thunks23PartialApplyEnumPayloadO14tupleWithLabelyACyxq_Gx_q_t_tcAEmr0_lFTc : $@convention(thin) <T, U> (@thin PartialApplyEnumPayload<T, U>.Type) -> @owned @callee_guaranteed (@in_guaranteed T, @in_guaranteed U) -> @out PartialApplyEnumPayload<T, U> { |
| 48 | +// CHECK-LABEL: sil shared [transparent] [ossa] @$s17enum_curry_thunks23PartialApplyEnumPayloadO14tupleWithLabelyACyxq_Gx_q_t_tcAEmr0_lF : $@convention(method) <T, U> (@in T, @in U, @thin PartialApplyEnumPayload<T, U>.Type) -> @out PartialApplyEnumPayload<T, U> { |
49 | 49 |
|
50 |
| -// CHECK-LABEL: sil shared [transparent] [thunk] [ossa] @$s17enum_curry_thunks23PartialApplyEnumPayloadO11AutoclosureyACyxq_GyyXAcAEmr0_lFTc : $@convention(thin) <T, U> (@thin PartialApplyEnumPayload<T, U>.Type) -> @owned @callee_guaranteed (@guaranteed @callee_guaranteed () -> ()) -> @out PartialApplyEnumPayload<T, U> { |
51 |
| -// CHECK-LABEL: sil shared [transparent] [ossa] @$s17enum_curry_thunks23PartialApplyEnumPayloadO11AutoclosureyACyxq_GyyXAcAEmr0_lF : $@convention(method) <T, U> (@owned @callee_guaranteed () -> (), @thin PartialApplyEnumPayload<T, U>.Type) -> @out PartialApplyEnumPayload<T, U> { |
| 50 | +// CHECK-LABEL: sil shared [transparent] [thunk] [ossa] @$s17enum_curry_thunks23PartialApplyEnumPayloadO11autoclosureyACyxq_GyyXAcAEmr0_lFTc : $@convention(thin) <T, U> (@thin PartialApplyEnumPayload<T, U>.Type) -> @owned @callee_guaranteed (@guaranteed @callee_guaranteed () -> ()) -> @out PartialApplyEnumPayload<T, U> { |
| 51 | +// CHECK-LABEL: sil shared [transparent] [ossa] @$s17enum_curry_thunks23PartialApplyEnumPayloadO11autoclosureyACyxq_GyyXAcAEmr0_lF : $@convention(method) <T, U> (@owned @callee_guaranteed () -> (), @thin PartialApplyEnumPayload<T, U>.Type) -> @out PartialApplyEnumPayload<T, U> { |
0 commit comments