Skip to content

Commit 6df033b

Browse files
committed
SIL: only use canonical substitution maps in SIL
* When constructing instructions which have substitution maps: initialize those with the canonical SubstitutionMap * Also initialize SILFunction::ForwardingSubMap with the canonical one Non-canonical substitution maps may prevent generic specializations. This fixes a problem in Embedded Swift where an error is given because a function cannot be specialized, although it should. #83895 rdar://159065157
1 parent 185ff12 commit 6df033b

15 files changed

+39
-26
lines changed

include/swift/SIL/SILFunction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1337,7 +1337,7 @@ class SILFunction
13371337
SubstitutionMap forwardingSubs) {
13381338
GenericEnv = env;
13391339
CapturedEnvs = capturedEnvs;
1340-
ForwardingSubMap = forwardingSubs;
1340+
ForwardingSubMap = forwardingSubs.getCanonical();
13411341
}
13421342

13431343
/// Retrieve the generic signature from the generic environment of this

include/swift/SIL/SILInstruction.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2674,7 +2674,7 @@ class ApplyInstBase<Impl, Base, false> : public Base {
26742674
: Base(kind, DebugLoc, baseArgs...), SubstCalleeType(substCalleeType),
26752675
SpecializationInfo(specializationInfo), NumCallArguments(args.size()),
26762676
NumTypeDependentOperands(typeDependentOperands.size()),
2677-
Substitutions(subs) {
2677+
Substitutions(subs.getCanonical()) {
26782678
assert(!!subs == !!callee->getType().castTo<SILFunctionType>()
26792679
->getInvocationGenericSignature());
26802680

@@ -5983,7 +5983,7 @@ class ThunkInst final
59835983
Kind kind, SubstitutionMap subs)
59845984
: UnaryInstructionWithTypeDependentOperandsBase(
59855985
debugLoc, operand, typeDependentOperands, outputType),
5986-
kind(kind), substitutions(subs) {}
5986+
kind(kind), substitutions(subs.getCanonical()) {}
59875987

59885988
static ThunkInst *create(SILDebugLocation debugLoc, SILValue operand,
59895989
SILModule &mod, SILFunction *func, Kind kind,
@@ -8650,7 +8650,7 @@ class InitBlockStorageHeaderInst
86508650
SILValue InvokeFunction, SILType BlockType,
86518651
SubstitutionMap Subs)
86528652
: InstructionBase(DebugLoc, BlockType),
8653-
Substitutions(Subs),
8653+
Substitutions(Subs.getCanonical()),
86548654
Operands(this, BlockStorage, InvokeFunction) {
86558655
}
86568656

lib/SIL/IR/SILInstructions.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ BuiltinInst::BuiltinInst(SILDebugLocation Loc, Identifier Name,
525525
ArrayRef<SILValue> allOperands,
526526
unsigned numNormalOperands)
527527
: InstructionBaseWithTrailingOperands(allOperands, Loc, ReturnType),
528-
Name(Name), Substitutions(Subs), numNormalOperands(numNormalOperands) {}
528+
Name(Name), Substitutions(Subs.getCanonical()), numNormalOperands(numNormalOperands) {}
529529

530530
IncrementProfilerCounterInst *IncrementProfilerCounterInst::create(
531531
SILDebugLocation Loc, unsigned CounterIdx, StringRef PGOFuncName,
@@ -3176,7 +3176,7 @@ KeyPathInst::KeyPathInst(SILDebugLocation Loc,
31763176
Pattern(Pattern),
31773177
numPatternOperands(numPatternOperands),
31783178
numTypeDependentOperands(allOperands.size() - numPatternOperands),
3179-
Substitutions(Subs)
3179+
Substitutions(Subs.getCanonical())
31803180
{
31813181
assert(allOperands.size() >= numPatternOperands);
31823182
auto *operandsBuf = getTrailingObjects<Operand>();

test/Concurrency/dynamic_checks_for_func_refs_in_preconcurrency_apis.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ import API
6464
// CHECK-NEXT: [[OPTIONAL_TEST:%.*]] = enum $Optional<@callee_guaranteed @substituted <τ_0_0> (@in_guaranteed τ_0_0) -> () for <Optional<Int>>>, #Optional.some!enumelt, [[CONVERTED_REABSTRACTED_TEST_REF]] :
6565
// CHECK-NEXT: // function_ref
6666
// CHECK-NEXT: [[COMPUTE_REF:%.*]] = function_ref @$s3API7computeyyyxcSglF : $@convention(thin) <τ_0_0> (@guaranteed Optional<@callee_guaranteed @substituted <τ_0_0> (@in_guaranteed τ_0_0) -> () for <τ_0_0>>) -> ()
67-
// CHECK-NEXT: {{.*}} = apply [[COMPUTE_REF]]<Int?>([[OPTIONAL_TEST]]) : $@convention(thin) <τ_0_0> (@guaranteed Optional<@callee_guaranteed @substituted <τ_0_0> (@in_guaranteed τ_0_0) -> () for <τ_0_0>>) -> ()
67+
// CHECK-NEXT: {{.*}} = apply [[COMPUTE_REF]]<Optional<Int>>([[OPTIONAL_TEST]]) : $@convention(thin) <τ_0_0> (@guaranteed Optional<@callee_guaranteed @substituted <τ_0_0> (@in_guaranteed τ_0_0) -> () for <τ_0_0>>) -> ()
6868
@MainActor
6969
func testMainActorContext() {
7070
compute(test) // no warning

test/SILGen/dynamic_self.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func testDynamicSelfDispatchGeneric(gy: GY<Int>) {
6969
// CHECK: bb0([[GY:%[0-9]+]] : @guaranteed $GY<Int>):
7070
// CHECK: [[GY_AS_GX:%[0-9]+]] = upcast [[GY]] : $GY<Int> to $GX<Array<Int>>
7171
// CHECK: [[GX_F:%[0-9]+]] = class_method [[GY_AS_GX]] : $GX<Array<Int>>, #GX.f : <T> (GX<T>) -> () -> @dynamic_self GX<T>, $@convention(method) <τ_0_0> (@guaranteed GX<τ_0_0>) -> @owned GX<τ_0_0>
72-
// CHECK: [[GX_RESULT:%[0-9]+]] = apply [[GX_F]]<[Int]>([[GY_AS_GX]]) : $@convention(method) <τ_0_0> (@guaranteed GX<τ_0_0>) -> @owned GX<τ_0_0>
72+
// CHECK: [[GX_RESULT:%[0-9]+]] = apply [[GX_F]]<Array<Int>>([[GY_AS_GX]]) : $@convention(method) <τ_0_0> (@guaranteed GX<τ_0_0>) -> @owned GX<τ_0_0>
7373
// CHECK: [[GY_RESULT:%[0-9]+]] = unchecked_ref_cast [[GX_RESULT]] : $GX<Array<Int>> to $GY<Int>
7474
// CHECK: destroy_value [[GY_RESULT]] : $GY<Int>
7575
_ = gy.f()

test/SILGen/foreach.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,14 @@ func trivialStructBreak(_ xx: [Int]) {
111111
// CHECK: [[BORROWED_ARRAY_STACK:%.*]] = alloc_stack $Array<Int>
112112
// CHECK: store [[ARRAY_COPY:%.*]] to [init] [[BORROWED_ARRAY_STACK]]
113113
// CHECK: [[MAKE_ITERATOR_FUNC:%.*]] = function_ref @$sSlss16IndexingIteratorVyxG0B0RtzrlE04makeB0ACyF : $@convention(method) <τ_0_0 where τ_0_0 : Collection, τ_0_0.Iterator == IndexingIterator<τ_0_0>> (@in τ_0_0) -> @out IndexingIterator<τ_0_0>
114-
// CHECK: apply [[MAKE_ITERATOR_FUNC]]<[Int]>([[PROJECT_ITERATOR_BOX]], [[BORROWED_ARRAY_STACK]])
114+
// CHECK: apply [[MAKE_ITERATOR_FUNC]]<Array<Int>>([[PROJECT_ITERATOR_BOX]], [[BORROWED_ARRAY_STACK]])
115115
// CHECK: br [[LOOP_DEST:bb[0-9]+]]
116116
//
117117
// CHECK: [[LOOP_DEST]]:
118118
// CHECK: [[GET_ELT_STACK:%.*]] = alloc_stack $Optional<Int>
119119
// CHECK: [[WRITE:%.*]] = begin_access [modify] [unknown] [[PROJECT_ITERATOR_BOX]] : $*IndexingIterator<Array<Int>>
120120
// CHECK: [[FUNC_REF:%.*]] = function_ref @$ss16IndexingIteratorV4next7ElementQzSgyF : $@convention(method) <τ_0_0 where τ_0_0 : Collection> (@inout IndexingIterator<τ_0_0>) -> @out Optional<τ_0_0.Element>
121-
// CHECK: apply [[FUNC_REF]]<[Int]>([[GET_ELT_STACK]], [[WRITE]])
121+
// CHECK: apply [[FUNC_REF]]<Array<Int>>([[GET_ELT_STACK]], [[WRITE]])
122122
// CHECK: [[IND_VAR:%.*]] = load [trivial] [[GET_ELT_STACK]]
123123
// CHECK: switch_enum [[IND_VAR]] : $Optional<Int>, case #Optional.some!enumelt: [[SOME_BB:bb[0-9]+]], case #Optional.none!enumelt: [[NONE_BB:bb[0-9]+]]
124124
//
@@ -212,14 +212,14 @@ func existentialBreak(_ xx: [P]) {
212212
// CHECK: [[BORROWED_ARRAY_STACK:%.*]] = alloc_stack $Array<any P>
213213
// CHECK: store [[ARRAY_COPY:%.*]] to [init] [[BORROWED_ARRAY_STACK]]
214214
// CHECK: [[MAKE_ITERATOR_FUNC:%.*]] = function_ref @$sSlss16IndexingIteratorVyxG0B0RtzrlE04makeB0ACyF : $@convention(method) <τ_0_0 where τ_0_0 : Collection, τ_0_0.Iterator == IndexingIterator<τ_0_0>> (@in τ_0_0) -> @out IndexingIterator<τ_0_0>
215-
// CHECK: apply [[MAKE_ITERATOR_FUNC]]<[any P]>([[PROJECT_ITERATOR_BOX]], [[BORROWED_ARRAY_STACK]])
215+
// CHECK: apply [[MAKE_ITERATOR_FUNC]]<Array<any P>>([[PROJECT_ITERATOR_BOX]], [[BORROWED_ARRAY_STACK]])
216216
// CHECK: [[ELT_STACK:%.*]] = alloc_stack $Optional<any P>
217217
// CHECK: br [[LOOP_DEST:bb[0-9]+]]
218218
//
219219
// CHECK: [[LOOP_DEST]]:
220220
// CHECK: [[WRITE:%.*]] = begin_access [modify] [unknown] [[PROJECT_ITERATOR_BOX]] : $*IndexingIterator<Array<any P>>
221221
// CHECK: [[FUNC_REF:%.*]] = function_ref @$ss16IndexingIteratorV4next7ElementQzSgyF : $@convention(method) <τ_0_0 where τ_0_0 : Collection> (@inout IndexingIterator<τ_0_0>) -> @out Optional<τ_0_0.Element>
222-
// CHECK: apply [[FUNC_REF]]<[any P]>([[ELT_STACK]], [[WRITE]])
222+
// CHECK: apply [[FUNC_REF]]<Array<any P>>([[ELT_STACK]], [[WRITE]])
223223
// CHECK: switch_enum_addr [[ELT_STACK]] : $*Optional<any P>, case #Optional.some!enumelt: [[SOME_BB:bb[0-9]+]], case #Optional.none!enumelt: [[NONE_BB:bb[0-9]+]]
224224
//
225225
// CHECK: [[SOME_BB]]:
@@ -373,14 +373,14 @@ func genericStructBreak<T>(_ xx: [GenericStruct<T>]) {
373373
// CHECK: [[BORROWED_ARRAY_STACK:%.*]] = alloc_stack $Array<GenericStruct<T>>
374374
// CHECK: store [[ARRAY_COPY:%.*]] to [init] [[BORROWED_ARRAY_STACK]]
375375
// CHECK: [[MAKE_ITERATOR_FUNC:%.*]] = function_ref @$sSlss16IndexingIteratorVyxG0B0RtzrlE04makeB0ACyF : $@convention(method) <τ_0_0 where τ_0_0 : Collection, τ_0_0.Iterator == IndexingIterator<τ_0_0>> (@in τ_0_0) -> @out IndexingIterator<τ_0_0>
376-
// CHECK: apply [[MAKE_ITERATOR_FUNC]]<[GenericStruct<T>]>([[PROJECT_ITERATOR_BOX]], [[BORROWED_ARRAY_STACK]])
376+
// CHECK: apply [[MAKE_ITERATOR_FUNC]]<Array<GenericStruct<T>>>([[PROJECT_ITERATOR_BOX]], [[BORROWED_ARRAY_STACK]])
377377
// CHECK: [[ELT_STACK:%.*]] = alloc_stack $Optional<GenericStruct<T>>
378378
// CHECK: br [[LOOP_DEST:bb[0-9]+]]
379379
//
380380
// CHECK: [[LOOP_DEST]]:
381381
// CHECK: [[WRITE:%.*]] = begin_access [modify] [unknown] [[PROJECT_ITERATOR_BOX]] : $*IndexingIterator<Array<GenericStruct<T>>>
382382
// CHECK: [[FUNC_REF:%.*]] = function_ref @$ss16IndexingIteratorV4next7ElementQzSgyF : $@convention(method) <τ_0_0 where τ_0_0 : Collection> (@inout IndexingIterator<τ_0_0>) -> @out Optional<τ_0_0.Element>
383-
// CHECK: apply [[FUNC_REF]]<[GenericStruct<T>]>([[ELT_STACK]], [[WRITE]])
383+
// CHECK: apply [[FUNC_REF]]<Array<GenericStruct<T>>>([[ELT_STACK]], [[WRITE]])
384384
// CHECK: switch_enum_addr [[ELT_STACK]] : $*Optional<GenericStruct<T>>, case #Optional.some!enumelt: [[SOME_BB:bb[0-9]+]], case #Optional.none!enumelt: [[NONE_BB:bb[0-9]+]]
385385
//
386386
// CHECK: [[SOME_BB]]:

test/SILGen/foreach_async.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ struct AsyncLazySequence<S: Sequence>: AsyncSequence {
8484
// CHECK: [[MUTATION:%.*]] = begin_access
8585
// CHECK: [[WITNESS_METHOD:%.*]] = function_ref @$sScIsE4next9isolation7ElementQzSgScA_pSgYi_tYa7FailureQzYKF : $@convention(method) @async <τ_0_0 where τ_0_0 : AsyncIteratorProtocol> (@sil_isolated @guaranteed Optional<any Actor>, @inout τ_0_0) -> (@out Optional<τ_0_0.Element>, @error_indirect τ_0_0.Failure)
8686
// CHECK: [[ERROR_SLOT:%[0-9]+]] = alloc_stack $Never
87-
// CHECK: try_apply [[WITNESS_METHOD]]<AsyncLazySequence<[Int]>.Iterator>([[NEXT_RESULT]], [[ERROR_SLOT]], [[ACTOR]], [[MUTATION]]) : $@convention(method) @async <τ_0_0 where τ_0_0 : AsyncIteratorProtocol> (@sil_isolated @guaranteed Optional<any Actor>, @inout τ_0_0) -> (@out Optional<τ_0_0.Element>, @error_indirect τ_0_0.Failure), normal [[NORMAL_BB:bb[0-2]+]], error [[ERROR_BB:bb[0-9]+]]
87+
// CHECK: try_apply [[WITNESS_METHOD]]<AsyncLazySequence<Array<Int>>.Iterator>([[NEXT_RESULT]], [[ERROR_SLOT]], [[ACTOR]], [[MUTATION]]) : $@convention(method) @async <τ_0_0 where τ_0_0 : AsyncIteratorProtocol> (@sil_isolated @guaranteed Optional<any Actor>, @inout τ_0_0) -> (@out Optional<τ_0_0.Element>, @error_indirect τ_0_0.Failure), normal [[NORMAL_BB:bb[0-2]+]], error [[ERROR_BB:bb[0-9]+]]
8888
// CHECK: [[NORMAL_BB]](
8989
// CHECK: end_access [[MUTATION]]
9090
// CHECK: switch_enum [[IND_VAR:%.*]] : $Optional<Int>, case #Optional.some!enumelt: [[SOME_BB:bb[0-9]+]], case #Optional.none!enumelt: [[NONE_BB:bb[0-9]+]]
@@ -117,7 +117,7 @@ func trivialStruct(_ xx: AsyncLazySequence<[Int]>) async {
117117
// CHECK: [[MUTATION:%.*]] = begin_access
118118
// CHECK: [[WITNESS_METHOD:%.*]] = function_ref @$sScIsE4next9isolation7ElementQzSgScA_pSgYi_tYa7FailureQzYKF : $@convention(method) @async <τ_0_0 where τ_0_0 : AsyncIteratorProtocol> (@sil_isolated @guaranteed Optional<any Actor>, @inout τ_0_0) -> (@out Optional<τ_0_0.Element>, @error_indirect τ_0_0.Failure)
119119
// CHECK: [[ERROR_SLOT:%[0-9]+]] = alloc_stack $Never
120-
// CHECK: try_apply [[WITNESS_METHOD]]<AsyncLazySequence<[Int]>.Iterator>([[NEXT_RESULT]], [[ERROR_SLOT]], [[ACTOR]], [[MUTATION]]) : $@convention(method) @async <τ_0_0 where τ_0_0 : AsyncIteratorProtocol> (@sil_isolated @guaranteed Optional<any Actor>, @inout τ_0_0) -> (@out Optional<τ_0_0.Element>, @error_indirect τ_0_0.Failure), normal [[NORMAL_BB:bb[0-2]+]], error [[ERROR_BB:bb[0-9]+]]
120+
// CHECK: try_apply [[WITNESS_METHOD]]<AsyncLazySequence<Array<Int>>.Iterator>([[NEXT_RESULT]], [[ERROR_SLOT]], [[ACTOR]], [[MUTATION]]) : $@convention(method) @async <τ_0_0 where τ_0_0 : AsyncIteratorProtocol> (@sil_isolated @guaranteed Optional<any Actor>, @inout τ_0_0) -> (@out Optional<τ_0_0.Element>, @error_indirect τ_0_0.Failure), normal [[NORMAL_BB:bb[0-2]+]], error [[ERROR_BB:bb[0-9]+]]
121121
// CHECK: [[NORMAL_BB]](
122122
// CHECK: end_access [[MUTATION]]
123123
// CHECK: switch_enum [[IND_VAR:%.*]] : $Optional<Int>, case #Optional.some!enumelt: [[SOME_BB:bb[0-9]+]], case #Optional.none!enumelt: [[NONE_BB:bb[0-9]+]]
@@ -177,7 +177,7 @@ func trivialStructBreak(_ xx: AsyncLazySequence<[Int]>) async {
177177
// CHECK: [[MUTATION:%.*]] = begin_access
178178
// CHECK: [[WITNESS_METHOD:%.*]] = function_ref @$sScIsE4next9isolation7ElementQzSgScA_pSgYi_tYa7FailureQzYKF : $@convention(method) @async <τ_0_0 where τ_0_0 : AsyncIteratorProtocol> (@sil_isolated @guaranteed Optional<any Actor>, @inout τ_0_0) -> (@out Optional<τ_0_0.Element>, @error_indirect τ_0_0.Failure)
179179
// CHECK: [[ERROR_SLOT:%[0-9]+]] = alloc_stack $Never
180-
// CHECK: try_apply [[WITNESS_METHOD]]<AsyncLazySequence<[Int]>.Iterator>([[NEXT_RESULT]], [[ERROR_SLOT]], [[ACTOR]], [[MUTATION]]) : $@convention(method) @async <τ_0_0 where τ_0_0 : AsyncIteratorProtocol> (@sil_isolated @guaranteed Optional<any Actor>, @inout τ_0_0) -> (@out Optional<τ_0_0.Element>, @error_indirect τ_0_0.Failure), normal [[NORMAL_BB:bb[0-2]+]], error [[ERROR_BB:bb[0-9]+]]
180+
// CHECK: try_apply [[WITNESS_METHOD]]<AsyncLazySequence<Array<Int>>.Iterator>([[NEXT_RESULT]], [[ERROR_SLOT]], [[ACTOR]], [[MUTATION]]) : $@convention(method) @async <τ_0_0 where τ_0_0 : AsyncIteratorProtocol> (@sil_isolated @guaranteed Optional<any Actor>, @inout τ_0_0) -> (@out Optional<τ_0_0.Element>, @error_indirect τ_0_0.Failure), normal [[NORMAL_BB:bb[0-2]+]], error [[ERROR_BB:bb[0-9]+]]
181181
// CHECK: [[NORMAL_BB]](
182182
// CHECK: end_access [[MUTATION]]
183183
// CHECK: switch_enum [[IND_VAR:%.*]] : $Optional<Int>, case #Optional.some!enumelt: [[SOME_BB:bb[0-9]+]], case #Optional.none!enumelt: [[NONE_BB:bb[0-9]+]]

test/SILGen/init_delegation_optional.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ extension Optional where Wrapped == Optional<Bool> {
369369
// CHECK-NEXT: [[PB:%[0-9]+]] = project_box [[MARKED_SELF_LIFETIME]]
370370
// CHECK: [[RESULT_ADDR:%[0-9]+]] = alloc_stack $Optional<Optional<Bool>>
371371
// CHECK: [[DELEG_INIT:%[0-9]+]] = function_ref @$sSq24init_delegation_optionalE12nonFailable1xSgyt_tcfC
372-
// CHECK-NEXT: apply [[DELEG_INIT]]<Bool?>([[RESULT_ADDR]], [[SELF_META]])
372+
// CHECK-NEXT: apply [[DELEG_INIT]]<Optional<Bool>>([[RESULT_ADDR]], [[SELF_META]])
373373
// CHECK-NEXT: [[RESULT:%[0-9]+]] = load [trivial] [[RESULT_ADDR]]
374374
// CHECK-NEXT: assign [[RESULT]] to [[PB]]
375375
// CHECK-NEXT: dealloc_stack [[RESULT_ADDR]]

test/SILGen/objc_bridging.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ func castToCFunction(ptr: UnsafeRawPointer) {
630630
// CHECK: store %0 to [trivial] [[IN]] : $*UnsafeRawPointer
631631
// CHECK: [[META:%.*]] = metatype $@thick (@convention(c) (Optional<AnyObject>) -> ()).Type
632632
// CHECK: [[CASTFN:%.*]] = function_ref @$ss13unsafeBitCast_2toq_x_q_mtr0_lF
633-
// CHECK: apply [[CASTFN]]<UnsafeRawPointer, @convention(c) (AnyObject?) -> ()>([[OUT]], [[IN]], [[META]]) : $@convention(thin) <τ_0_0, τ_0_1> (@in_guaranteed τ_0_0, @thick τ_0_1.Type) -> @out τ_0_1
633+
// CHECK: apply [[CASTFN]]<UnsafeRawPointer, @convention(c) (Optional<AnyObject>) -> ()>([[OUT]], [[IN]], [[META]]) : $@convention(thin) <τ_0_0, τ_0_1> (@in_guaranteed τ_0_0, @thick τ_0_1.Type) -> @out τ_0_1
634634
// CHECK: [[RESULT:%.*]] = load [trivial] [[OUT]] : $*@convention(c) (Optional<AnyObject>) -> ()
635635
typealias Fn = @convention(c) (AnyObject?) -> Void
636636
unsafeBitCast(ptr, to: Fn.self)(nil)

test/SILGen/opaque_result_type_nested_optional.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ _ = bar(foo())
1111
// CHECK: [[UNUSED:%.*]] = alloc_stack $S<Optional<Int>>
1212
// CHECK: [[INNER:%.*]] = alloc_stack $S<Optional<Int>>
1313
// CHECK: [[FN:%.*]] = function_ref @$s40opaque_result_type_nested_optional_other3bary1AQzxAA1PRzlF : $@convention(thin) <τ_0_0 where τ_0_0 : P> (@in_guaranteed τ_0_0) -> @out τ_0_0.A
14-
// CHECK: apply [[FN]]<S<Int?>>([[OUTER]], [[INNER]]) : $@convention(thin) <τ_0_0 where τ_0_0 : P> (@in_guaranteed τ_0_0) -> @out τ_0_0.A
14+
// CHECK: apply [[FN]]<S<Optional<Int>>>([[OUTER]], [[INNER]]) : $@convention(thin) <τ_0_0 where τ_0_0 : P> (@in_guaranteed τ_0_0) -> @out τ_0_0.A
1515
// CHECK: return

0 commit comments

Comments
 (0)