@@ -225,7 +225,8 @@ class GettablePropertyProjector : public ComponentProjector {
225
225
auto &function = builder.getFunction ();
226
226
auto substType = component.getComponentType ().subst (keyPath->getSubstitutions (),
227
227
None);
228
- SILType type = function.getLoweredType (substType);
228
+ SILType type = function.getLoweredType (
229
+ Lowering::AbstractionPattern::getOpaque (), substType);
229
230
auto addr = builder.createAllocStack (loc, type);
230
231
231
232
assertHasNoContext ();
@@ -302,7 +303,8 @@ class SettablePropertyProjector : public GettablePropertyProjector {
302
303
auto &function = builder.getFunction ();
303
304
auto substType = component.getComponentType ().subst (keyPath->getSubstitutions (),
304
305
None);
305
- SILType type = function.getLoweredType (substType);
306
+ SILType type = function.getLoweredType (
307
+ Lowering::AbstractionPattern::getOpaque (), substType);
306
308
auto addr = builder.createAllocStack (loc, type);
307
309
308
310
assertHasNoContext ();
@@ -351,7 +353,8 @@ class OptionalWrapProjector : public ComponentProjector {
351
353
auto &function = builder.getFunction ();
352
354
auto substType = component.getComponentType ().subst (keyPath->getSubstitutions (),
353
355
None);
354
- SILType optType = function.getLoweredType (substType);
356
+ SILType optType = function.getLoweredType (
357
+ Lowering::AbstractionPattern::getOpaque (), substType);
355
358
SILType objType = optType.getOptionalObjectType ().getAddressType ();
356
359
357
360
assert (objType && " optional wrap must return an optional" );
@@ -557,7 +560,8 @@ class CompleteKeyPathProjector : public KeyPathProjector {
557
560
auto resultCanType = components.back ().getComponentType ();
558
561
auto &function = builder.getFunction ();
559
562
auto substType = resultCanType.subst (keyPath->getSubstitutions (), None);
560
- auto optType = function.getLoweredType (substType);
563
+ auto optType = function.getLoweredType (
564
+ Lowering::AbstractionPattern::getOpaque (), substType);
561
565
562
566
assert (optType.getOptionalObjectType () &&
563
567
" Optional-chained key path should result in an optional" );
0 commit comments