mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
AST: Use AbstractFunctionDecl::computeType()
This commit is contained in:
@@ -3006,18 +3006,7 @@ void ClassDecl::addImplicitDestructor() {
|
||||
recordObjCMethod(DD);
|
||||
|
||||
// Assign DD the interface type (Self) -> () -> ()
|
||||
ArrayRef<AnyFunctionType::Param> noParams;
|
||||
AnyFunctionType::ExtInfo info;
|
||||
Type selfTy = selfDecl->getInterfaceType();
|
||||
Type voidTy = TupleType::getEmpty(ctx);
|
||||
Type funcTy = FunctionType::get(noParams, voidTy, info);
|
||||
if (auto *sig = DD->getGenericSignature()) {
|
||||
DD->setInterfaceType(
|
||||
GenericFunctionType::get(sig, {selfTy}, funcTy, info));
|
||||
} else {
|
||||
DD->setInterfaceType(
|
||||
FunctionType::get({selfTy}, funcTy, info));
|
||||
}
|
||||
DD->computeType();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user