Files
kotlin/compiler/testData/codegen/bytecodeText/constants/noInlineNonStaticJavaField_lv10.kt
Dmitry Petrov 16b7bece46 Fix constant expression inlining logic
Constant expressions are inlined if they do not depend on non-inlineable
vals.
Java constants are always inlined.
Kotlin constants are inlined in LV 1.1+.
2017-10-13 17:01:42 +03:00

15 lines
233 B
Kotlin
Vendored

// LANGUAGE_VERSION: 1.0
// FILE: test.kt
fun test1(a: A) = a.X
fun test2(a: A) = 1 + a.X
fun test3(a: A) = 1 < a.X
// FILE: A.java
public class A {
public final int X = 42;
}
// @TestKt.class:
// 0 42
// 0 43
// 3 GETFIELD A.X