Implement tests to sam-with-receiver support in new scripting API
plus minor tests refactoring
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
public class Exec {
|
||||
void exec(Sam sam) {}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
@SamWithReceiver1
|
||||
public interface Sam {
|
||||
void run(String a);
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface SamWithReceiver1 {
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
val e = Exec()
|
||||
|
||||
e.exec {
|
||||
this.substring(1)
|
||||
}
|
||||
Reference in New Issue
Block a user