File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -390,7 +390,8 @@ namespace {
390
390
} \
391
391
RetTy visit##Name##StorageType(Can##Name##StorageType type, \
392
392
AbstractionPattern origType) { \
393
- auto referentType = type->getReferentType (); \
393
+ auto referentType = \
394
+ type->getReferentType ()->lookThroughSingleOptionalType (); \
394
395
auto concreteType = getConcreteReferenceStorageReferent (referentType); \
395
396
if (Name##StorageType::get (concreteType, TC.Context ) \
396
397
->isLoadable (Expansion.getResilienceExpansion ())) { \
Original file line number Diff line number Diff line change @@ -161,8 +161,13 @@ func takesUnownedStruct(_ z: Unowned<C>) {}
161
161
// Make sure we don't crash here
162
162
struct UnownedGenericCapture < T : AnyObject > {
163
163
var object : T
164
+ var optionalObject : T ?
164
165
165
166
func f( ) -> ( ) -> ( ) {
166
167
return { [ unowned object] in _ = object }
167
168
}
169
+
170
+ func g( ) -> ( ) -> ( ) {
171
+ return { [ unowned optionalObject] in _ = optionalObject }
172
+ }
168
173
}
You can’t perform that action at this time.
0 commit comments