[SAM with receiver] Prepare module structure to K2 implementation

This commit is contained in:
Dmitriy Novozhilov
2022-06-22 13:22:47 +03:00
committed by teamcity
parent e54c6eeafc
commit ffc680f4a6
38 changed files with 209 additions and 136 deletions
@@ -0,0 +1,20 @@
// !DIAGNOSTICS: -UNUSED_ANONYMOUS_PARAMETER,-UNUSED_VARIABLE
// FILE: Sam.java
public interface Sam {
String run(String a, String b);
}
// FILE: test.kt
fun test() {
Sam { a, b ->
System.out.println(a)
""
}
Sam <!TYPE_MISMATCH!>{ <!EXPECTED_PARAMETERS_NUMBER_MISMATCH!>b<!> ->
val a = <!NO_THIS!>this@Sam<!>
System.out.<!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>a<!>)
""
}<!>
}