Files
kotlin-fork/plugins/sam-with-receiver/testData/diagnostics/samConversionNoParameters.kt
T
2022-06-27 08:11:33 +00:00

29 lines
414 B
Kotlin
Vendored

// FIR_IDENTICAL
// FILE: SamConstructor.kt
@SamWithReceiver
public interface Sam {
void run();
}
// FILE: Exec.java
public class Exec {
void exec(Sam sam) {}
}
// FILE: test.kt
annotation class SamWithReceiver
fun test() {
val e = Exec()
e.exec {
System.out.println("Hello, world!")
}
e.exec {
val a: String = <!NO_THIS!>this<!>
System.out.println(a)
}
}