4bb5e978a7
TODO: tests
26 lines
469 B
Kotlin
Vendored
26 lines
469 B
Kotlin
Vendored
// !DIAGNOSTICS: -UNUSED_PARAMETER,-UNUSED_VARIABLE
|
|
|
|
// FILE: SamWithReceiver1.java
|
|
import java.lang.annotation.Retention;
|
|
import java.lang.annotation.RetentionPolicy;
|
|
|
|
@Retention(RetentionPolicy.RUNTIME)
|
|
public @interface SamWithReceiver1 {
|
|
}
|
|
|
|
// FILE: Sam.java
|
|
@SamWithReceiver1
|
|
public interface Sam {
|
|
void run(String a);
|
|
}
|
|
|
|
// FILE: Exec.java
|
|
public class Exec {
|
|
void exec(Sam sam) {}
|
|
}
|
|
|
|
// FILE: test.kts
|
|
val e = Exec()
|
|
|
|
e.exec { System.out.println(this) }
|