Add codegen tests with substituted bytecode version (1.8->1.9)
This commit is contained in:
@@ -23,11 +23,13 @@ enum class JvmTarget(override val description: String) : TargetPlatformVersion {
|
||||
JVM_1_8("1.8"),
|
||||
;
|
||||
|
||||
val bytecodeVersion: Int
|
||||
get() = when(this) {
|
||||
val bytecodeVersion: Int by lazy {
|
||||
when (this) {
|
||||
JVM_1_6 -> Opcodes.V1_6
|
||||
JVM_1_8 -> Opcodes.V1_8
|
||||
JVM_1_8 ->
|
||||
if (java.lang.Boolean.valueOf(System.getProperty("kotlin.test.substitute.bytecode.1.8.to.1.9"))) Opcodes.V1_9 else Opcodes.V1_8
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmField
|
||||
@@ -40,7 +42,7 @@ enum class JvmTarget(override val description: String) : TargetPlatformVersion {
|
||||
val platformDescription = values().find { it.bytecodeVersion == bytecodeVersion }?.description ?:
|
||||
when (bytecodeVersion) {
|
||||
Opcodes.V1_7 -> "1.7"
|
||||
Opcodes.V1_8 + 1 -> "1.9"
|
||||
Opcodes.V1_9 -> "1.9"
|
||||
else -> null
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user