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.
2 parents 65bd39f + 3f553be commit f52029eCopy full SHA for f52029e
stdlib/public/Reflection/TypeLowering.cpp
@@ -2121,7 +2121,9 @@ class LowerType
2121
return TC.getReferenceTypeInfo(Kind, ReferenceTI->getReferenceCounting());
2122
2123
if (auto *EnumTI = dyn_cast<EnumTypeInfo>(TI)) {
2124
- if (EnumTI->isOptional() && Kind == ReferenceKind::Weak) {
+ if (EnumTI->isOptional() &&
2125
+ (Kind == ReferenceKind::Weak || Kind == ReferenceKind::Unowned ||
2126
+ Kind == ReferenceKind::Unmanaged)) {
2127
auto *TI = TC.getTypeInfo(EnumTI->getCases()[0].TR, ExternalTypeInfo);
2128
return rebuildStorageTypeInfo(TI, Kind);
2129
}
0 commit comments