File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -141,17 +141,10 @@ void TBDGenVisitor::visitAbstractFunctionDecl(AbstractFunctionDecl *AFD) {
141
141
// functions) are public symbols, as the default values are computed at the
142
142
// call site.
143
143
auto index = 0 ;
144
- auto paramLists = AFD->getParameterLists ();
145
- // Skip the first arguments, which contains Self (etc.), can't be defaulted,
146
- // and are ignored for the purposes of default argument indices.
147
- if (AFD->getDeclContext ()->isTypeContext ())
148
- paramLists = paramLists.slice (1 );
149
- for (auto *paramList : paramLists) {
150
- for (auto *param : *paramList) {
151
- if (param->getDefaultValue ())
152
- addSymbol (SILDeclRef::getDefaultArgGenerator (AFD, index));
153
- index++;
154
- }
144
+ for (auto *param : *AFD->getParameters ()) {
145
+ if (param->getDefaultValue ())
146
+ addSymbol (SILDeclRef::getDefaultArgGenerator (AFD, index));
147
+ index++;
155
148
}
156
149
}
157
150
You can’t perform that action at this time.
0 commit comments