mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 08:31:26 +00:00
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:
23
compiler/testData/codegen/bytecodeText/noInlineJavaProtectedConstants.kt
vendored
Normal file
23
compiler/testData/codegen/bytecodeText/noInlineJavaProtectedConstants.kt
vendored
Normal 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
|
||||
Reference in New Issue
Block a user