File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -1753,10 +1753,12 @@ static ConstraintSystem::TypeMatchResult matchCallArguments(
17531753
17541754 if (ctx.TypeCheckerOpts.EnableTypeInferenceFromDefaultArguments) {
17551755 auto *paramList = getParameterList(callee);
1756- auto *PD = paramList->get(paramIdx);
1756+ if (!paramList)
1757+ continue;
17571758
17581759 // There is nothing to infer if parameter doesn't have any
17591760 // generic parameters in its type.
1761+ auto *PD = paramList->get(paramIdx);
17601762 if (!PD->getInterfaceType()->hasTypeParameter())
17611763 continue;
17621764
Original file line number Diff line number Diff line change 11// RUN: %target-typecheck-verify-swift
2+ // RUN: %target-typecheck-verify-swift -enable-experimental-type-inference-from-defaults
23
34func takeIntToInt( _ f: ( Int ) -> Int ) { }
45func takeIntIntToInt( _ f: ( Int , Int ) -> Int ) { }
You can’t perform that action at this time.
0 commit comments