mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 00:21:26 +00:00
Copy compileTimeInitializer for const property descriptor
#KT-15802 Fixed
This commit is contained in:
27
compiler/testData/codegen/bytecodeText/inlineJavaConstantFromSubclass.kt
vendored
Normal file
27
compiler/testData/codegen/bytecodeText/inlineJavaConstantFromSubclass.kt
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
// FILE: first/JavaSuperclass.java
|
||||
|
||||
package first;
|
||||
|
||||
public class JavaSuperclass {
|
||||
public static final String CONSTANT = "foo";
|
||||
}
|
||||
|
||||
// FILE: first/JavaSubclass.java
|
||||
|
||||
package first;
|
||||
|
||||
public class JavaSubclass extends JavaSuperclass {
|
||||
}
|
||||
|
||||
// FILE: second/bar.kt
|
||||
|
||||
package second
|
||||
|
||||
import first.JavaSubclass
|
||||
|
||||
fun bar() = JavaSubclass.CONSTANT
|
||||
|
||||
// @second/BarKt.class
|
||||
// 0 INVOKESTATIC
|
||||
// 0 GETSTATIC
|
||||
// 1 LDC "foo"
|
||||
Reference in New Issue
Block a user