Implement SamWithReceiverAnnotations annotation and it's handling (KT-15848)

TODO: tests
This commit is contained in:
Ilya Chernikov
2017-01-24 18:45:04 +01:00
parent f1c4230a68
commit 4bb5e978a7
7 changed files with 159 additions and 3 deletions
@@ -0,0 +1,25 @@
// !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) }