File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
include/swift/RemoteInspection Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1038,10 +1038,12 @@ class ReflectionContext
10381038 // Generic SIL @box type - there is always an instantiated metadata
10391039 // pointer for the boxed type.
10401040 if (auto Meta = readMetadata (*MetadataAddress)) {
1041- auto GenericHeapMeta =
1042- cast<TargetGenericBoxHeapMetadata<Runtime>>(Meta.getLocalBuffer ());
1043- return getMetadataTypeInfo (GenericHeapMeta->BoxedType ,
1044- ExternalTypeInfo);
1041+ if (auto *GenericHeapMeta = cast<TargetGenericBoxHeapMetadata<Runtime>>(
1042+ Meta.getLocalBuffer ())) {
1043+ auto MetadataAddress = GenericHeapMeta->BoxedType ;
1044+ auto TR = readTypeFromMetadata (MetadataAddress);
1045+ return getTypeInfo (TR, ExternalTypeInfo);
1046+ }
10451047 }
10461048 return nullptr ;
10471049 }
You can’t perform that action at this time.
0 commit comments