Skip property accessors for constants

- Inline protected constants from Java at use sites
 - Do not create accessors for private constants in Kotlin

 #KT-11734 In Progress
This commit is contained in:
Mikhail Zarechenskiy
2016-12-05 12:02:43 +03:00
parent bd14c24592
commit 8c1e165f18
12 changed files with 151 additions and 14 deletions

View File

@@ -0,0 +1,23 @@
// LANGUAGE_VERSION: 1.0
// FILE: first/Foo.java
package first;
public class Foo {
protected static final int FOO = 42;
}
// FILE: bar.kt
package second
import first.Foo
class Bar : Foo() {
fun bar() = FOO
}
// @second/BarKt.class
// 1 INVOKESTATIC
// 0 GETSTATIC
// 1 BIPUSH 42