mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Property wrappers] Make sure to canonicalize a type properly in DI.
Fixes a crash/assertion involving sugared types rdar://problem/51581937.
This commit is contained in:
@@ -1412,7 +1412,8 @@ namespace {
|
||||
SGF.getModule().getSwiftModule(), ctor);
|
||||
|
||||
Type ity = ctor->getInterfaceType();
|
||||
AnyFunctionType *substIty = ity.subst(subs)->castTo<AnyFunctionType>();
|
||||
AnyFunctionType *substIty =
|
||||
ity.subst(subs)->getCanonicalType()->castTo<AnyFunctionType>();
|
||||
|
||||
auto initRef = SILDeclRef(ctor, SILDeclRef::Kind::Allocator)
|
||||
.asForeign(requiresForeignEntryPoint(ctor));
|
||||
|
||||
Reference in New Issue
Block a user