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(
1753
1753
1754
1754
if (ctx.TypeCheckerOpts.EnableTypeInferenceFromDefaultArguments) {
1755
1755
auto *paramList = getParameterList(callee);
1756
- auto *PD = paramList->get(paramIdx);
1756
+ if (!paramList)
1757
+ continue;
1757
1758
1758
1759
// There is nothing to infer if parameter doesn't have any
1759
1760
// generic parameters in its type.
1761
+ auto *PD = paramList->get(paramIdx);
1760
1762
if (!PD->getInterfaceType()->hasTypeParameter())
1761
1763
continue;
1762
1764
Original file line number Diff line number Diff line change 1
1
// RUN: %target-typecheck-verify-swift
2
+ // RUN: %target-typecheck-verify-swift -enable-experimental-type-inference-from-defaults
2
3
3
4
func takeIntToInt( _ f: ( Int ) -> Int ) { }
4
5
func takeIntIntToInt( _ f: ( Int , Int ) -> Int ) { }
You can’t perform that action at this time.
0 commit comments