We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc3bc76 commit dd3c8afCopy full SHA for dd3c8af
lib/AST/Type.cpp
@@ -841,8 +841,11 @@ swift::computeDefaultMap(ArrayRef<AnyFunctionType::Param> params,
841
// Find the corresponding parameter list.
842
const ParameterList *paramList = nullptr;
843
if (auto *func = dyn_cast<AbstractFunctionDecl>(paramOwner)) {
844
- if (level < func->getNumParameterLists())
845
- paramList = func->getParameterList(level);
+ if (func->getImplicitSelfDecl()) {
+ if (level == 1)
846
+ paramList = func->getParameters();
847
+ } else if (level == 0)
848
849
} else if (auto *subscript = dyn_cast<SubscriptDecl>(paramOwner)) {
850
if (level == 1)
851
paramList = subscript->getIndices();
0 commit comments