JVM: remove support for disabling NoConstantValueAttributeForNonConstVals
This feature is enabled by default since 1.4, which is the earliest language version supported by Kotlin at this moment.
This commit is contained in:
+1
-3
@@ -1,7 +1,5 @@
|
||||
// DONT_TARGET_EXACT_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: MINOR: CONST_EQUIVALENCE
|
||||
// !LANGUAGE: -NoConstantValueAttributeForNonConstVals
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: NATIVE
|
||||
|
||||
object A {
|
||||
@@ -33,4 +31,4 @@ fun box(): String {
|
||||
if (A.bNullable !== B.bNullable) return "Fail 5: A.bNullable !== B.bNullable"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NoConstantValueAttributeForNonConstVals
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
|
||||
|
||||
+1
-2
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NoConstantValueAttributeForNonConstVals +JvmFieldInInterface
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
|
||||
@@ -64,4 +63,4 @@ fun box(): String {
|
||||
assertEquals(400, testTopLevelVal)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
-2
@@ -1,5 +1,3 @@
|
||||
// !LANGUAGE: +NoConstantValueAttributeForNonConstVals +JvmFieldInInterface
|
||||
|
||||
class C {
|
||||
val testClassVal = 100
|
||||
|
||||
Vendored
-61
@@ -1,61 +0,0 @@
|
||||
// !LANGUAGE: -NoConstantValueAttributeForNonConstVals +JvmFieldInInterface
|
||||
|
||||
class C {
|
||||
val testClassVal = 100
|
||||
|
||||
@JvmField
|
||||
val testJvmFieldVal = 105
|
||||
|
||||
companion object {
|
||||
val testCompanionObjectVal = 110
|
||||
|
||||
@JvmStatic
|
||||
val testJvmStaticCompanionObjectVal = 120
|
||||
|
||||
@JvmField
|
||||
val testJvmFieldCompanionObjectVal = 130
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
interface IFoo {
|
||||
companion object {
|
||||
val testInterfaceCompanionObjectVal = 200
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
interface IBar {
|
||||
companion object {
|
||||
@JvmField
|
||||
val testJvmFieldInInterfaceCompanionObject = 210
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
object Obj {
|
||||
val testObjectVal = 300
|
||||
|
||||
@JvmStatic
|
||||
val testJvmStaticObjectVal = 310
|
||||
|
||||
@JvmField
|
||||
val testJvmFieldObjectVal = 320
|
||||
}
|
||||
|
||||
|
||||
val testTopLevelVal = 400
|
||||
|
||||
|
||||
// 1 final I testClassVal = 100
|
||||
// 1 final I testJvmFieldVal = 105
|
||||
// 1 final static I testCompanionObjectVal = 110
|
||||
// 1 final static I testJvmStaticCompanionObjectVal = 120
|
||||
// 1 final static I testJvmFieldCompanionObjectVal = 130
|
||||
// 1 final static I testInterfaceCompanionObjectVal = 200
|
||||
// 1 final static I testJvmFieldInInterfaceCompanionObject = 210
|
||||
// 1 final static I testObjectVal = 300
|
||||
// 1 final static I testJvmStaticObjectVal = 310
|
||||
// 1 final static I testJvmFieldObjectVal = 320
|
||||
// 1 final static I testTopLevelVal = 400
|
||||
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NoConstantValueAttributeForNonConstVals
|
||||
val a = 1.0 + 10
|
||||
val b = 2 + 10.0
|
||||
val c = 3.0F + 10
|
||||
|
||||
Reference in New Issue
Block a user