We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6e3503 commit 919121aCopy full SHA for 919121a
lib/SILGen/SILGenPoly.cpp
@@ -398,10 +398,11 @@ ManagedValue Transform::transform(ManagedValue v,
398
// optional or Any, force it.
399
if (inputIsOptional && !outputIsOptional &&
400
!outputSubstType->isExistentialType()) {
401
- // isImplicitUnwrap is hardcoded false because this method is never
402
- // used to generate code from a ForceValueExpr.
+ // isImplicitUnwrap is hardcoded true because the looseness in types of
+ // @objc witnesses/overrides that we're handling here only allows IUOs,
403
+ // not explicit Optionals.
404
v = SGF.emitCheckedGetOptionalValueFrom(Loc, v,
- /*isImplicitUnwrap*/ false,
405
+ /*isImplicitUnwrap*/ true,
406
SGF.getTypeLowering(v.getType()),
407
SGFContext());
408
0 commit comments