File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -145,8 +145,6 @@ SILDeclRef::SILDeclRef(SILDeclRef::Loc baseLoc,
145
145
} else if (auto *ACE = baseLoc.dyn_cast <AbstractClosureExpr *>()) {
146
146
loc = ACE;
147
147
kind = Kind::Func;
148
- assert (ACE->getParameterLists ().size () >= 1 &&
149
- " no param patterns for function?!" );
150
148
} else {
151
149
llvm_unreachable (" impossible SILDeclRef loc" );
152
150
}
@@ -810,7 +808,7 @@ unsigned SILDeclRef::getParameterListCount() const {
810
808
auto *vd = getDecl ();
811
809
812
810
if (auto *func = dyn_cast<AbstractFunctionDecl>(vd)) {
813
- return func->getParameterLists (). size () ;
811
+ return func->getImplicitSelfDecl () ? 2 : 1 ;
814
812
} else if (auto *ed = dyn_cast<EnumElementDecl>(vd)) {
815
813
return ed->hasAssociatedValues () ? 2 : 1 ;
816
814
} else if (isa<ClassDecl>(vd)) {
You can’t perform that action at this time.
0 commit comments