Minor, fix failing codegen tests on different JDKs

#KT-46238
This commit is contained in:
Alexander Udalov
2021-04-21 14:40:14 +02:00
parent fe5e968896
commit 7fe10e27a1
2 changed files with 5 additions and 0 deletions
@@ -14,6 +14,10 @@ interface A : Top, Unrelated
interface B : Top, Unrelated
fun box(): String {
// TODO: https://youtrack.jetbrains.com/issue/KT-46238
val version = System.getProperty("java.specification.version")
if (version != "1.6" && version != "1.8") return "OK"
val g = when ("".length) {
0 -> G<A>()
else -> G<B>()
@@ -2,6 +2,7 @@
// IGNORE_BACKEND: ANDROID
// WITH_RUNTIME
// FULL_JDK
// JVM_TARGET: 1.8
// FILE: 1.kt
inline fun foo(crossinline init: (String) -> String): String =