Minor: kt21014.kt - add JVM_TARGET 1.8

This commit is contained in:
Dmitry Petrov
2020-12-23 10:55:16 +03:00
parent 10a5727260
commit 632f5af442
8 changed files with 56 additions and 0 deletions
@@ -0,0 +1,21 @@
// WITH_RUNTIME
// IGNORE_BACKEND: JVM
// IGNORE_LIGHT_ANALYSIS
// DONT_TARGET_EXACT_BACKEND: WASM
// WASM_MUTE_REASON: PROPERTY_REFERENCES
// JVM_TARGET: 1.8
// ^ This test causes SIGSEGV on JDK 1.6 with old back-end.
// Running it on JDK 1.6 (even with IGNORE_BACKEND: JVM) would still crash corresponding JVM process.
fun box(): String {
val ints = intArrayOf(1, 2, 3)
val test1 = IntArray::size.get(ints)
if (test1 != 3) throw Exception("IntArray::size.get(ints) != 3: $test1")
val test2 = with(ints, IntArray::size)
if (test2 != 3) throw Exception("with(ints, IntArray::size) != 3: $test2")
return "OK"
}