[NI] Avoid constraints from expected type for effectively empty system

Expression will be checked against expected type later.

 Theoretically, this is not very good, but it aligns with the old
 inference, plus it helps avoiding multiple type mismatch diagnostics.
This commit is contained in:
Mikhail Zarechenskiy
2019-04-17 03:04:58 +03:00
parent 5dea14f4ce
commit bcc8802014
87 changed files with 130 additions and 125 deletions
@@ -8,7 +8,7 @@ fun overloadedFun1(c: Any = "", b: String = "", f: Any = "") = Right
fun overloadedFun1(b: Any = "", c: Any = "", e: String = "") = Wrong
val test1: Right = overloadedFun1(b = "")
val test1a: Wrong = <!NI;TYPE_MISMATCH, TYPE_MISMATCH!>overloadedFun1(b = "")<!>
val test1a: Wrong = <!TYPE_MISMATCH!>overloadedFun1(b = "")<!>
fun overloadedFun2(a: String, b: Any = "") = Right
fun overloadedFun2(a: Any, b: String = "") = Wrong