[SAM with receiver] Add implementation for K2

This commit is contained in:
Dmitriy Novozhilov
2022-06-22 15:24:15 +03:00
committed by teamcity
parent 49c836e706
commit 65ac82ee46
20 changed files with 306 additions and 39 deletions
@@ -1,6 +1,4 @@
// FIR_IDENTICAL
// FILE: Sam.java
// FILE: SamConstructor.kt
@SamWithReceiver
public interface Sam {
String run(String a, String b);
@@ -10,7 +8,7 @@ public interface Sam {
annotation class SamWithReceiver
fun test() {
Sam <!TYPE_MISMATCH!>{ <!EXPECTED_PARAMETERS_NUMBER_MISMATCH!>a, <!CANNOT_INFER_PARAMETER_TYPE!>b<!><!> ->
Sam <!ARGUMENT_TYPE_MISMATCH!>{ a, <!CANNOT_INFER_PARAMETER_TYPE!>b<!> ->
System.out.println(a)
""
}<!>