[ConstraintSystem] Bail out of inference from default arguments if there

is no parameter list for the callee.

This can happen when the callee is a closure that has been assigned to
a variable.
This commit is contained in:
Holly Borla
2022-03-25 00:20:34 -07:00
parent c71b7c500e
commit 0fdb9a38d2
2 changed files with 4 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
// RUN: %target-typecheck-verify-swift
// RUN: %target-typecheck-verify-swift -enable-experimental-type-inference-from-defaults
func takeIntToInt(_ f: (Int) -> Int) { }
func takeIntIntToInt(_ f: (Int, Int) -> Int) { }