Don't generate accessors for @JvmField properties in primary constructor

This commit is contained in:
Michael Bogdanov
2015-11-28 14:17:16 +03:00
parent de37cb8f40
commit 1bf521c645
9 changed files with 80 additions and 21 deletions
@@ -0,0 +1,6 @@
public class Test {
public static String invokeMethodWithPublicField() {
C c = new C("OK");
return c.foo;
}
}
@@ -0,0 +1,7 @@
class C(@JvmField val foo: String) {
}
fun box(): String {
return Test.invokeMethodWithPublicField()
}
+9
View File
@@ -0,0 +1,9 @@
class C(@JvmField var foo: String) {
@JvmField var bar: String = "123"
}
// 0 getFoo
// 0 setFoo
// 0 getBar
// 0 setBar