Iniital implementation of synthetic extensions for SAM-adapter functions (non-static only)
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
// FILE: KotlinFile.kt
|
||||
fun foo(javaClass: JavaClass) {
|
||||
javaClass.somethingPublic
|
||||
javaClass.<!UNRESOLVED_REFERENCE!>somethingProtected<!>
|
||||
javaClass.<!UNRESOLVED_REFERENCE!>somethingPrivate<!>
|
||||
javaClass.<!UNRESOLVED_REFERENCE!>somethingPackage<!>
|
||||
<!VAL_REASSIGNMENT!>javaClass.somethingPublic<!> = 1
|
||||
}
|
||||
|
||||
// FILE: JavaClass.java
|
||||
public class JavaClass {
|
||||
public int getSomethingPublic() { return 1; }
|
||||
protected int getSomethingProtected() { return 1; }
|
||||
private int getSomethingPrivate() { return 1; }
|
||||
int getSomethingPackage() { return 1; }
|
||||
|
||||
protected void setSomethingPublic(int value) {}
|
||||
}
|
||||
Reference in New Issue
Block a user