Add diagnostics from NI for SAM with receiver tests

This commit is contained in:
Mikhail Zarechenskiy
2019-04-26 07:48:43 +03:00
parent c95eddbbbe
commit 97a6b3436c
6 changed files with 18 additions and 12 deletions
@@ -1,3 +1,4 @@
// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER,-UNUSED_VARIABLE
// FILE: Sam.java
@@ -10,9 +11,9 @@ public interface Sam {
annotation class SamWithReceiver
fun test() {
Sam { <!CANNOT_INFER_PARAMETER_TYPE, EXPECTED_PARAMETERS_NUMBER_MISMATCH!>a<!> ->
System.out.println(<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>a<!>)
}
Sam <!NI;TYPE_MISMATCH!>{ <!CANNOT_INFER_PARAMETER_TYPE, EXPECTED_PARAMETERS_NUMBER_MISMATCH!>a<!> ->
System.out.<!NI;OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>a<!>)
}<!>
Sam {
val a: String = this