mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
AST: Give destructors a second parameter list
Constructors and methods had two parameter lists, one for self and one for the formal parameters. Destructors only had one parameter list, which introduced an annoying corner case.
This commit is contained in:
@@ -813,8 +813,6 @@ unsigned SILDeclRef::getParameterListCount() const {
|
||||
return func->getParameterLists().size();
|
||||
} else if (auto *ed = dyn_cast<EnumElementDecl>(vd)) {
|
||||
return ed->hasAssociatedValues() ? 2 : 1;
|
||||
} else if (isa<DestructorDecl>(vd)) {
|
||||
return 1;
|
||||
} else if (isa<ClassDecl>(vd)) {
|
||||
return 2;
|
||||
} else if (isa<VarDecl>(vd)) {
|
||||
|
||||
Reference in New Issue
Block a user