Remove LANGUAGE_VERSION from non-coroutine codegen tests

Most of these tests used this directive as a way to opt in to a new
language feature, and most of those features are already stable for a
long time, so no opt-in is needed. Some other tests used the directive
to opt out from a language feature, replace those by the `LANGUAGE`
directive. One test used the directive to test behavior that actually
depended on the API version; use `API_VERSION` directive there instead.
This commit is contained in:
Alexander Udalov
2018-12-17 16:27:16 +01:00
parent e3c381a298
commit 5b58eb8491
86 changed files with 120 additions and 397 deletions
@@ -1,8 +1,8 @@
// !LANGUAGE: -ProperForInArrayLoopRangeVariableAssignmentSemantic
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
// LANGUAGE_VERSION: 1.2
// IGNORE_BACKEND: JS
fun box(): String {
@@ -13,4 +13,4 @@ fun box(): String {
xs = intArrayOf(4, 5)
}
return if (sum == 15) "OK" else "Fail: $sum"
}
}
@@ -1,16 +1,6 @@
// WITH_RUNTIME
// LANGUAGE_VERSION: 1.3
// In Kotlin 1.0, in a for-in-array loop, range expression is cached in
// a local variable unless it is already a local variable.
// This caused the following quirky behavior:
// if an array variable is updated in the loop body, it affects the loop
// execution (see https://youtrack.jetbrains.com/issue/KT-21354).
// Most likely it is a bug, however, fixing it right now is a breaking
// change requiring a proper deprecation loop.
// When the design decision is made, it might be required to update this
// test (e.g., by adding a proper LANGUAGE_VERSION directive).
// Note that JS back-end handles this case "correctly".
// See https://youtrack.jetbrains.com/issue/KT-21354
fun box(): String {
var xs = intArrayOf(1, 2, 3)
@@ -20,4 +10,4 @@ fun box(): String {
xs = intArrayOf(4, 5)
}
return if (sum == 123) "OK" else "Fail: $sum"
}
}