[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
@@ -1,6 +1,6 @@
// !WITH_NEW_INFERENCE
val (a1, a2) = A()
val (b1: Int, <!NI;TYPE_MISMATCH!>b2: Int<!>) = <!OI;COMPONENT_FUNCTION_RETURN_TYPE_MISMATCH!>A()<!>
val (b1: Int, b2: Int) = <!COMPONENT_FUNCTION_RETURN_TYPE_MISMATCH!>A()<!>
val (c1) = <!UNRESOLVED_REFERENCE!>unresolved<!>
<!WRONG_MODIFIER_TARGET!>private<!> val (d1) = A()