Copy compileTimeInitializer for const property descriptor
#KT-15802 Fixed
This commit is contained in:
@@ -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"
|
||||
+1
-1
@@ -34,6 +34,6 @@ public open class C : A {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
@kotlin.Deprecated(message = "Deprecated in Java") public const final override /*1*/ /*fake_override*/ val D: kotlin.String
|
||||
@kotlin.Deprecated(message = "Deprecated in Java") public const final override /*1*/ /*fake_override*/ val D: kotlin.String = "d"
|
||||
@kotlin.Deprecated(message = "Deprecated in Java") public open override /*1*/ /*fake_override*/ fun bar(): kotlin.Unit
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public abstract class A</*0*/ F : kotlin.Any!> : B<F!> {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
invisible_fake const final override /*1*/ /*fake_override*/ val MAX_ARRAY_SIZE: kotlin.Int
|
||||
invisible_fake const final override /*1*/ /*fake_override*/ val MAX_ARRAY_SIZE: kotlin.Int = 2147483639
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun </*0*/ T : kotlin.Any!> finishToArray(/*0*/ p0: kotlin.Array<(out) T!>!, /*1*/ p1: kotlin.collections.(Mutable)Iterator<*>!): kotlin.Array<(out) T!>!
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun hugeCapacity(/*0*/ p0: kotlin.Int): kotlin.Int
|
||||
}
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ public abstract class A : B {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
invisible_fake const final override /*1*/ /*fake_override*/ val MAX_ARRAY_SIZE: kotlin.Int
|
||||
invisible_fake const final override /*1*/ /*fake_override*/ val MAX_ARRAY_SIZE: kotlin.Int = 2147483639
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun </*0*/ T : kotlin.Any!> finishToArray(/*0*/ p0: kotlin.Array<(out) T!>!, /*1*/ p1: kotlin.collections.(Mutable)Iterator<*>!): kotlin.Array<(out) T!>!
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun hugeCapacity(/*0*/ p0: kotlin.Int): kotlin.Int
|
||||
}
|
||||
|
||||
@@ -47,8 +47,8 @@ public abstract class A : java.util.ArrayList<kotlin.String!> {
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun writeObject(/*0*/ p0: java.io.ObjectOutputStream!): kotlin.Unit
|
||||
|
||||
// Static members
|
||||
invisible_fake const final override /*1*/ /*fake_override*/ val MAX_ARRAY_SIZE: kotlin.Int
|
||||
invisible_fake const final override /*1*/ /*fake_override*/ val serialVersionUID: kotlin.Long
|
||||
invisible_fake const final override /*1*/ /*fake_override*/ val MAX_ARRAY_SIZE: kotlin.Int = 2147483639
|
||||
invisible_fake const final override /*1*/ /*fake_override*/ val serialVersionUID: kotlin.Long = 8683452581122892189.toLong()
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun </*0*/ T : kotlin.Any!> finishToArray(/*0*/ p0: kotlin.Array<(out) T!>!, /*1*/ p1: kotlin.collections.(Mutable)Iterator<*>!): kotlin.Array<(out) T!>!
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun hugeCapacity(/*0*/ p0: kotlin.Int): kotlin.Int
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun subListRangeCheck(/*0*/ p0: kotlin.Int, /*1*/ p1: kotlin.Int, /*2*/ p2: kotlin.Int): kotlin.Unit
|
||||
|
||||
@@ -55,11 +55,11 @@ public open class A : java.util.HashMap<kotlin.Int!, kotlin.Double!>, B<kotlin.I
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun writeObject(/*0*/ p0: java.io.ObjectOutputStream!): kotlin.Unit
|
||||
|
||||
// Static members
|
||||
invisible_fake const final override /*1*/ /*fake_override*/ val ALTERNATIVE_HASHING_THRESHOLD_DEFAULT: kotlin.Int
|
||||
invisible_fake const final override /*1*/ /*fake_override*/ val DEFAULT_INITIAL_CAPACITY: kotlin.Int
|
||||
invisible_fake const final override /*1*/ /*fake_override*/ val DEFAULT_LOAD_FACTOR: kotlin.Float
|
||||
invisible_fake const final override /*1*/ /*fake_override*/ val MAXIMUM_CAPACITY: kotlin.Int
|
||||
invisible_fake const final override /*1*/ /*fake_override*/ val serialVersionUID: kotlin.Long
|
||||
invisible_fake const final override /*1*/ /*fake_override*/ val ALTERNATIVE_HASHING_THRESHOLD_DEFAULT: kotlin.Int = 2147483647
|
||||
invisible_fake const final override /*1*/ /*fake_override*/ val DEFAULT_INITIAL_CAPACITY: kotlin.Int = 16
|
||||
invisible_fake const final override /*1*/ /*fake_override*/ val DEFAULT_LOAD_FACTOR: kotlin.Float = 0.75.toFloat()
|
||||
invisible_fake const final override /*1*/ /*fake_override*/ val MAXIMUM_CAPACITY: kotlin.Int = 1073741824
|
||||
invisible_fake const final override /*1*/ /*fake_override*/ val serialVersionUID: kotlin.Long = 362498820763181265.toLong()
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun eq(/*0*/ p0: kotlin.Any!, /*1*/ p1: kotlin.Any!): kotlin.Boolean
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun indexFor(/*0*/ p0: kotlin.Int, /*1*/ p1: kotlin.Int): kotlin.Int
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ public object D : C {
|
||||
public const final val inObject: kotlin.Int = 10
|
||||
public const final val withoutInitializer: kotlin.Int
|
||||
public const open override /*1*/ val x: kotlin.Int = 9
|
||||
public const abstract override /*1*/ /*fake_override*/ val y: kotlin.Int
|
||||
public const abstract override /*1*/ /*fake_override*/ val y: kotlin.Int = 7
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
// FILE: A.java
|
||||
|
||||
public class A {
|
||||
public static final String FOO = "foo";
|
||||
}
|
||||
|
||||
// FILE: B.java
|
||||
|
||||
public class B extends A {
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
const val K1 = B.FOO
|
||||
const val K2 = A.FOO
|
||||
@@ -0,0 +1,24 @@
|
||||
package
|
||||
|
||||
public const val K1: kotlin.String = "foo"
|
||||
public const val K2: kotlin.String = "foo"
|
||||
|
||||
public open class A {
|
||||
public constructor A()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public const final val FOO: kotlin.String = "foo"
|
||||
}
|
||||
|
||||
public open class B : A {
|
||||
public constructor B()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public const final override /*1*/ /*fake_override*/ val FOO: kotlin.String = "foo"
|
||||
}
|
||||
@@ -9,7 +9,7 @@ public open class C : I {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public const final override /*1*/ /*fake_override*/ val a: kotlin.Int
|
||||
public const final override /*1*/ /*fake_override*/ val a: kotlin.Int = 1
|
||||
public/*package*/ final var b: kotlin.Int
|
||||
public/*package*/ open fun bar(): kotlin.Unit
|
||||
}
|
||||
@@ -21,7 +21,7 @@ public open class D : K {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public const final override /*1*/ /*fake_override*/ val a: kotlin.Int
|
||||
public const final override /*1*/ /*fake_override*/ val a: kotlin.Int = 1
|
||||
public/*package*/ final override /*1*/ /*fake_override*/ var b: kotlin.Int
|
||||
public/*package*/ final var c: kotlin.Int
|
||||
public/*package*/ open override /*1*/ /*fake_override*/ fun bar(): kotlin.Unit
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ public open class E : A, B {
|
||||
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public const final override /*1*/ /*fake_override*/ val field: kotlin.Int
|
||||
public const final override /*1*/ /*fake_override*/ val field: kotlin.Int = 1
|
||||
public const final override /*1*/ /*fake_override*/ val field: kotlin.String
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ public open class E : A, B {
|
||||
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public const final override /*1*/ /*fake_override*/ val field: kotlin.Int
|
||||
public const final override /*1*/ /*fake_override*/ val field: kotlin.Int = 1
|
||||
public const final override /*1*/ /*fake_override*/ val field: kotlin.String
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -26,7 +26,7 @@ public interface C : A {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public const final override /*1*/ /*fake_override*/ val field: kotlin.Int
|
||||
public const final override /*1*/ /*fake_override*/ val field: kotlin.Int = 1
|
||||
}
|
||||
|
||||
public interface D : B {
|
||||
@@ -45,7 +45,7 @@ public open class E : C, D {
|
||||
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public const final override /*1*/ /*fake_override*/ val field: kotlin.Int
|
||||
public const final override /*1*/ /*fake_override*/ val field: kotlin.Int = 1
|
||||
public const final override /*1*/ /*fake_override*/ val field: kotlin.String
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ public open class EE : E {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public const final override /*1*/ /*fake_override*/ val field: kotlin.Int
|
||||
public const final override /*1*/ /*fake_override*/ val field: kotlin.Int = 1
|
||||
public const final override /*1*/ /*fake_override*/ val field: kotlin.String
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -9,7 +9,7 @@ public open class C : I {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public const final override /*1*/ /*fake_override*/ val a: kotlin.Int
|
||||
public const final override /*1*/ /*fake_override*/ val a: kotlin.Int = 1
|
||||
public/*package*/ final var b: kotlin.Int
|
||||
public/*package*/ open fun bar(): kotlin.Unit
|
||||
}
|
||||
@@ -21,7 +21,7 @@ public open class D : K, I {
|
||||
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public const final override /*2*/ /*fake_override*/ val a: kotlin.Int
|
||||
public const final override /*2*/ /*fake_override*/ val a: kotlin.Int = 1
|
||||
public/*package*/ final override /*1*/ /*fake_override*/ var b: kotlin.Int
|
||||
public/*package*/ final var c: kotlin.Int
|
||||
public/*package*/ open override /*1*/ /*fake_override*/ fun bar(): kotlin.Unit
|
||||
|
||||
Vendored
+1
-1
@@ -9,7 +9,7 @@ public open class C : I {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public const final override /*1*/ /*fake_override*/ val a: kotlin.Int
|
||||
public const final override /*1*/ /*fake_override*/ val a: kotlin.Int = 1
|
||||
public/*package*/ final var b: kotlin.Int
|
||||
public/*package*/ open fun bar(): kotlin.Unit
|
||||
}
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ public fun foo(): kotlin.Unit
|
||||
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
invisible_fake const final override /*1*/ /*fake_override*/ val MAX_ARRAY_SIZE: kotlin.Int
|
||||
invisible_fake const final override /*1*/ /*fake_override*/ val MAX_ARRAY_SIZE: kotlin.Int = 2147483639
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun </*0*/ T : kotlin.Any!> finishToArray(/*0*/ p0: kotlin.Array<(out) T!>!, /*1*/ p1: kotlin.collections.(Mutable)Iterator<*>!): kotlin.Array<(out) T!>!
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun hugeCapacity(/*0*/ p0: kotlin.Int): kotlin.Int
|
||||
}
|
||||
|
||||
compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/customClassMutableList.txt
Vendored
+1
-1
@@ -37,7 +37,7 @@ public fun foo(): kotlin.Unit
|
||||
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
invisible_fake const final override /*1*/ /*fake_override*/ val MAX_ARRAY_SIZE: kotlin.Int
|
||||
invisible_fake const final override /*1*/ /*fake_override*/ val MAX_ARRAY_SIZE: kotlin.Int = 2147483639
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun </*0*/ T : kotlin.Any!> finishToArray(/*0*/ p0: kotlin.Array<(out) T!>!, /*1*/ p1: kotlin.collections.(Mutable)Iterator<*>!): kotlin.Array<(out) T!>!
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun hugeCapacity(/*0*/ p0: kotlin.Int): kotlin.Int
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -37,7 +37,7 @@ public val y: B<kotlin.String>
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
invisible_fake const final override /*1*/ /*fake_override*/ val MAX_ARRAY_SIZE: kotlin.Int
|
||||
invisible_fake const final override /*1*/ /*fake_override*/ val MAX_ARRAY_SIZE: kotlin.Int = 2147483639
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun </*0*/ T : kotlin.Any!> finishToArray(/*0*/ p0: kotlin.Array<(out) T!>!, /*1*/ p1: kotlin.collections.(Mutable)Iterator<*>!): kotlin.Array<(out) T!>!
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun hugeCapacity(/*0*/ p0: kotlin.Int): kotlin.Int
|
||||
}
|
||||
@@ -76,7 +76,7 @@ public val y: B<kotlin.String>
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
invisible_fake const final override /*1*/ /*fake_override*/ val MAX_ARRAY_SIZE: kotlin.Int
|
||||
invisible_fake const final override /*1*/ /*fake_override*/ val MAX_ARRAY_SIZE: kotlin.Int = 2147483639
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun </*0*/ T : kotlin.Any!> finishToArray(/*0*/ p0: kotlin.Array<(out) T!>!, /*1*/ p1: kotlin.collections.(Mutable)Iterator<*>!): kotlin.Array<(out) T!>!
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun hugeCapacity(/*0*/ p0: kotlin.Int): kotlin.Int
|
||||
}
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ public fun foo(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
invisible_fake const final override /*1*/ /*fake_override*/ val MAX_ARRAY_SIZE: kotlin.Int
|
||||
invisible_fake const final override /*1*/ /*fake_override*/ val MAX_ARRAY_SIZE: kotlin.Int = 2147483639
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun </*0*/ T : kotlin.Any!> finishToArray(/*0*/ p0: kotlin.Array<(out) T!>!, /*1*/ p1: kotlin.collections.(Mutable)Iterator<*>!): kotlin.Array<(out) T!>!
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun hugeCapacity(/*0*/ p0: kotlin.Int): kotlin.Int
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public abstract class ClassDoesNotOverrideMethod : java.util.Date {
|
||||
invisible_fake final override /*1*/ /*fake_override*/ var defaultCenturyStart: kotlin.Int
|
||||
invisible_fake final override /*1*/ /*fake_override*/ val gcal: sun.util.calendar.BaseCalendar!
|
||||
invisible_fake final override /*1*/ /*fake_override*/ var jcal: sun.util.calendar.BaseCalendar!
|
||||
invisible_fake const final override /*1*/ /*fake_override*/ val serialVersionUID: kotlin.Long
|
||||
invisible_fake const final override /*1*/ /*fake_override*/ val serialVersionUID: kotlin.Long = 7523967970034938905.toLong()
|
||||
invisible_fake final override /*1*/ /*fake_override*/ val ttb: kotlin.IntArray!
|
||||
invisible_fake final override /*1*/ /*fake_override*/ val wtb: kotlin.Array<(out) kotlin.String!>!
|
||||
@kotlin.Deprecated(message = "Deprecated in Java") public open override /*1*/ /*fake_override*/ fun UTC(/*0*/ p0: kotlin.Int, /*1*/ p1: kotlin.Int, /*2*/ p2: kotlin.Int, /*3*/ p3: kotlin.Int, /*4*/ p4: kotlin.Int, /*5*/ p5: kotlin.Int): kotlin.Long
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ public open class ModalityOfFakeOverrides : java.util.AbstractList<kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun </*0*/ T : kotlin.Any!> toArray(/*0*/ p0: kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>!
|
||||
|
||||
// Static members
|
||||
invisible_fake const final override /*1*/ /*fake_override*/ val MAX_ARRAY_SIZE: kotlin.Int
|
||||
invisible_fake const final override /*1*/ /*fake_override*/ val MAX_ARRAY_SIZE: kotlin.Int = 2147483639
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun </*0*/ T : kotlin.Any!> finishToArray(/*0*/ p0: kotlin.Array<(out) T!>!, /*1*/ p1: kotlin.collections.(Mutable)Iterator<*>!): kotlin.Array<(out) T!>!
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun hugeCapacity(/*0*/ p0: kotlin.Int): kotlin.Int
|
||||
}
|
||||
|
||||
+2
-2
@@ -4,11 +4,11 @@ public/*package*/ open class Child : test.Parent1, test.Parent2 {
|
||||
public/*package*/ constructor Child()
|
||||
|
||||
// Static members
|
||||
public const final override /*1*/ /*fake_override*/ val a: kotlin.Int
|
||||
public const final override /*1*/ /*fake_override*/ val a: kotlin.Int = 1
|
||||
public final var b: kotlin.String!
|
||||
public final var c: kotlin.Int
|
||||
public final var d: kotlin.String!
|
||||
public const final override /*1*/ /*fake_override*/ val e: kotlin.Int
|
||||
public const final override /*1*/ /*fake_override*/ val e: kotlin.Int = 2
|
||||
public open fun bar(): kotlin.Unit
|
||||
public open fun baz(): kotlin.Unit
|
||||
}
|
||||
|
||||
+2
-2
@@ -26,11 +26,11 @@ public/*package*/ final enum class StaticMembersInEnum : kotlin.Enum<test.Static
|
||||
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<test.StaticMembersInEnum!>!
|
||||
|
||||
// Static members
|
||||
public const final override /*1*/ /*fake_override*/ val a: kotlin.Int
|
||||
public const final override /*1*/ /*fake_override*/ val a: kotlin.Int = 1
|
||||
public final var b: kotlin.Int
|
||||
public final var c: kotlin.Int
|
||||
public final var d: kotlin.Int
|
||||
public const final override /*1*/ /*fake_override*/ val e: kotlin.Int
|
||||
public const final override /*1*/ /*fake_override*/ val e: kotlin.Int = 2
|
||||
public open fun foo(): kotlin.Unit
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.StaticMembersInEnum
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.StaticMembersInEnum>
|
||||
|
||||
@@ -12531,6 +12531,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("fromJavaSubclass.kt")
|
||||
public void testFromJavaSubclass() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/const/fromJavaSubclass.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("noDivisionByZeroFeature.kt")
|
||||
public void testNoDivisionByZeroFeature() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/const/noDivisionByZeroFeature.kt");
|
||||
|
||||
@@ -138,6 +138,12 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("inlineJavaConstantFromSubclass.kt")
|
||||
public void testInlineJavaConstantFromSubclass() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineJavaConstantFromSubclass.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("inlineJavaStaticFields.kt")
|
||||
public void testInlineJavaStaticFields() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineJavaStaticFields.kt");
|
||||
|
||||
+5
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2016 JetBrains s.r.o.
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -333,6 +333,10 @@ public class PropertyDescriptorImpl extends VariableDescriptorWithInitializerImp
|
||||
substitutedDescriptor.setOverriddenDescriptors(overridden);
|
||||
}
|
||||
|
||||
if (isConst() && compileTimeInitializer != null) {
|
||||
substitutedDescriptor.setCompileTimeInitializer(compileTimeInitializer);
|
||||
}
|
||||
|
||||
return substitutedDescriptor;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user