[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:
+1
-1
@@ -8,5 +8,5 @@ class Client<T, X: Base<T>>(<!UNUSED_PARAMETER!>x<!>: X)
|
||||
|
||||
fun test() {
|
||||
val c = Client(StringBase()) // Type inference fails here for T.
|
||||
val <!UNUSED_VARIABLE!>i<!> : Int = <!NI;TYPE_MISMATCH, TYPE_MISMATCH!>c<!>
|
||||
val <!UNUSED_VARIABLE!>i<!> : Int = <!TYPE_MISMATCH!>c<!>
|
||||
}
|
||||
Reference in New Issue
Block a user