Skip to content

Commit 66a3a56

Browse files
committed
Use ->getCanonicalType in BridgedTypeArray::getAt to avoid assertion failures
1 parent ae6129c commit 66a3a56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/swift/SIL/SILBridging.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ struct BridgedTypeArray {
418418

419419
SWIFT_IMPORT_UNSAFE
420420
swift::SILType getAt(SwiftInt index) const {
421-
auto ty = swift::CanType(typeArray[index]);
421+
auto ty = typeArray[index]->getCanonicalType();
422422
if (ty->isLegalSILType())
423423
return swift::SILType::getPrimitiveObjectType(ty);
424424
return swift::SILType();

0 commit comments

Comments
 (0)