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:
Slava Pestov
2018-07-18 16:13:52 -07:00
parent fe8263e2ec
commit 301d9f0cf3
42 changed files with 96 additions and 107 deletions

View File

@@ -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)) {