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:
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
|
// !LANGUAGE: +NewCapturedReceiverFieldNamingConvention
|
||||||
// LOCAL_VARIABLE_TABLE
|
// LOCAL_VARIABLE_TABLE
|
||||||
// LANGUAGE_VERSION: 1.3
|
|
||||||
|
|
||||||
fun String.foo(count: Int) {
|
fun String.foo(count: Int) {
|
||||||
val x = false
|
val x = false
|
||||||
@@ -15,4 +15,4 @@ fun String.foo(count: Int) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun block(block: Long.() -> Unit) = 5L.block()
|
fun block(block: Long.() -> Unit) = 5L.block()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
// !LANGUAGE: +NewCapturedReceiverFieldNamingConvention
|
||||||
// LOCAL_VARIABLE_TABLE
|
// LOCAL_VARIABLE_TABLE
|
||||||
// LANGUAGE_VERSION: 1.3
|
|
||||||
|
|
||||||
fun String.foo(count: Int) {
|
fun String.foo(count: Int) {
|
||||||
val x = false
|
val x = false
|
||||||
@@ -15,4 +15,4 @@ fun String.foo(count: Int) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun block(block: Long.() -> Unit) = 5L.block()
|
fun block(block: Long.() -> Unit) = 5L.block()
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
// IGNORE_BACKEND: JVM_IR
|
// IGNORE_BACKEND: JVM_IR
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
|
|
||||||
var result = ""
|
var result = ""
|
||||||
|
|
||||||
|
|||||||
-1
@@ -1,6 +1,5 @@
|
|||||||
// IGNORE_BACKEND: JVM_IR
|
// IGNORE_BACKEND: JVM_IR
|
||||||
// IGNORE_BACKEND: JS_IR
|
// IGNORE_BACKEND: JS_IR
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
// WITH_REFLECT
|
// WITH_REFLECT
|
||||||
|
|
||||||
// IGNORE_BACKEND: JS
|
// IGNORE_BACKEND: JS
|
||||||
|
|||||||
+1
-2
@@ -1,6 +1,5 @@
|
|||||||
// IGNORE_BACKEND: JVM_IR
|
// IGNORE_BACKEND: JVM_IR
|
||||||
// IGNORE_BACKEND: JS_IR
|
// IGNORE_BACKEND: JS_IR
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
// WITH_REFLECT
|
// WITH_REFLECT
|
||||||
|
|
||||||
// IGNORE_BACKEND: JS
|
// IGNORE_BACKEND: JS
|
||||||
@@ -37,4 +36,4 @@ fun box(): String {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return "OK"
|
return "OK"
|
||||||
}
|
}
|
||||||
|
|||||||
-1
@@ -1,6 +1,5 @@
|
|||||||
// IGNORE_BACKEND: JVM_IR
|
// IGNORE_BACKEND: JVM_IR
|
||||||
// IGNORE_BACKEND: JS_IR
|
// IGNORE_BACKEND: JS_IR
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
// WITH_REFLECT
|
// WITH_REFLECT
|
||||||
|
|
||||||
// IGNORE_BACKEND: JS
|
// IGNORE_BACKEND: JS
|
||||||
|
|||||||
+1
-2
@@ -1,6 +1,5 @@
|
|||||||
// IGNORE_BACKEND: JVM_IR
|
// IGNORE_BACKEND: JVM_IR
|
||||||
// IGNORE_BACKEND: JS_IR
|
// IGNORE_BACKEND: JS_IR
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
// WITH_REFLECT
|
// WITH_REFLECT
|
||||||
|
|
||||||
// IGNORE_BACKEND: JS
|
// IGNORE_BACKEND: JS
|
||||||
@@ -39,4 +38,4 @@ fun box(): String {
|
|||||||
check(e.contentEquals(doubleArrayOf(1.0)), "Fail 5: ${e.joinToString()}")
|
check(e.contentEquals(doubleArrayOf(1.0)), "Fail 5: ${e.joinToString()}")
|
||||||
"OK"
|
"OK"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
|
// !LANGUAGE: -DataClassInheritance
|
||||||
// IGNORE_BACKEND: JS_IR
|
// IGNORE_BACKEND: JS_IR
|
||||||
// IGNORE_BACKEND: JVM_IR
|
// IGNORE_BACKEND: JVM_IR
|
||||||
// LANGUAGE_VERSION: 1.0
|
|
||||||
|
|
||||||
data class Foo(val s: String)
|
data class Foo(val s: String)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
// LANGUAGE_VERSION: 1.3
|
|
||||||
|
|
||||||
class Test {
|
class Test {
|
||||||
private companion object {
|
private companion object {
|
||||||
val res = "OK"
|
val res = "OK"
|
||||||
|
|||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
|
// !LANGUAGE: -ProperForInArrayLoopRangeVariableAssignmentSemantic
|
||||||
// IGNORE_BACKEND: NATIVE
|
// IGNORE_BACKEND: NATIVE
|
||||||
// IGNORE_BACKEND: JVM_IR
|
// IGNORE_BACKEND: JVM_IR
|
||||||
// IGNORE_BACKEND: JS_IR
|
// IGNORE_BACKEND: JS_IR
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
// IGNORE_BACKEND: JS
|
// IGNORE_BACKEND: JS
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
@@ -13,4 +13,4 @@ fun box(): String {
|
|||||||
xs = intArrayOf(4, 5)
|
xs = intArrayOf(4, 5)
|
||||||
}
|
}
|
||||||
return if (sum == 15) "OK" else "Fail: $sum"
|
return if (sum == 15) "OK" else "Fail: $sum"
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-12
@@ -1,16 +1,6 @@
|
|||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// LANGUAGE_VERSION: 1.3
|
|
||||||
|
|
||||||
// In Kotlin 1.0, in a for-in-array loop, range expression is cached in
|
// See https://youtrack.jetbrains.com/issue/KT-21354
|
||||||
// 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".
|
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
var xs = intArrayOf(1, 2, 3)
|
var xs = intArrayOf(1, 2, 3)
|
||||||
@@ -20,4 +10,4 @@ fun box(): String {
|
|||||||
xs = intArrayOf(4, 5)
|
xs = intArrayOf(4, 5)
|
||||||
}
|
}
|
||||||
return if (sum == 123) "OK" else "Fail: $sum"
|
return if (sum == 123) "OK" else "Fail: $sum"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// LANGUAGE_VERSION: 1.1
|
// !LANGUAGE: -ProhibitDataClassesOverridingCopy
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val a: A = B(1)
|
val a: A = B(1)
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
// LANGUAGE_VERSION: 1.0
|
|
||||||
|
|
||||||
public interface Base {
|
public interface Base {
|
||||||
fun test() = "base fail"
|
fun test() = "base fail"
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
|
// !LANGUAGE: -NoDelegationToJavaDefaultInterfaceMembers
|
||||||
// SKIP_JDK6
|
// SKIP_JDK6
|
||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// LANGUAGE_VERSION: 1.0
|
|
||||||
// FILE: Base.java
|
// FILE: Base.java
|
||||||
|
|
||||||
public interface Base {
|
public interface Base {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
// IGNORE_BACKEND: JVM_IR
|
// IGNORE_BACKEND: JVM_IR
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
|
|
||||||
enum class A {
|
enum class A {
|
||||||
X {
|
X {
|
||||||
@@ -22,4 +21,4 @@ enum class A {
|
|||||||
abstract val test: String
|
abstract val test: String
|
||||||
}
|
}
|
||||||
|
|
||||||
fun box() = A.X.test
|
fun box() = A.X.test
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
// IGNORE_BACKEND: JVM_IR
|
// IGNORE_BACKEND: JVM_IR
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
|
|
||||||
enum class A {
|
enum class A {
|
||||||
X {
|
X {
|
||||||
@@ -21,4 +20,4 @@ enum class A {
|
|||||||
abstract val test: String
|
abstract val test: String
|
||||||
}
|
}
|
||||||
|
|
||||||
fun box() = A.X.test
|
fun box() = A.X.test
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
// IGNORE_BACKEND: JVM_IR
|
// IGNORE_BACKEND: JVM_IR
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
|
|
||||||
enum class A {
|
enum class A {
|
||||||
X {
|
X {
|
||||||
@@ -18,4 +17,4 @@ enum class A {
|
|||||||
abstract val test: String
|
abstract val test: String
|
||||||
}
|
}
|
||||||
|
|
||||||
fun box() = A.X.test
|
fun box() = A.X.test
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
// IGNORE_BACKEND: JVM_IR
|
// IGNORE_BACKEND: JVM_IR
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
|
|
||||||
enum class A {
|
enum class A {
|
||||||
X {
|
X {
|
||||||
@@ -17,4 +16,4 @@ enum class A {
|
|||||||
abstract val test: String
|
abstract val test: String
|
||||||
}
|
}
|
||||||
|
|
||||||
fun box() = A.X.test
|
fun box() = A.X.test
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
|
|
||||||
enum class A {
|
enum class A {
|
||||||
X {
|
X {
|
||||||
val x = "OK"
|
val x = "OK"
|
||||||
@@ -16,4 +14,4 @@ enum class A {
|
|||||||
abstract val test: String
|
abstract val test: String
|
||||||
}
|
}
|
||||||
|
|
||||||
fun box() = A.X.test
|
fun box() = A.X.test
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
// IGNORE_BACKEND: JVM_IR
|
// IGNORE_BACKEND: JVM_IR
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
|
|
||||||
enum class X {
|
enum class X {
|
||||||
B {
|
B {
|
||||||
@@ -19,4 +18,4 @@ enum class X {
|
|||||||
abstract val value: String
|
abstract val value: String
|
||||||
}
|
}
|
||||||
|
|
||||||
fun box() = X.B.value
|
fun box() = X.B.value
|
||||||
|
|||||||
+1
-2
@@ -1,5 +1,4 @@
|
|||||||
// IGNORE_BACKEND: JVM_IR
|
// IGNORE_BACKEND: JVM_IR
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
|
|
||||||
enum class X {
|
enum class X {
|
||||||
B {
|
B {
|
||||||
@@ -13,4 +12,4 @@ enum class X {
|
|||||||
abstract val test: String
|
abstract val test: String
|
||||||
}
|
}
|
||||||
|
|
||||||
fun box() = X.B.test
|
fun box() = X.B.test
|
||||||
|
|||||||
+2
-2
@@ -2,7 +2,7 @@
|
|||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// FILE: test.kt
|
// FILE: test.kt
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
var component1Evaluated = false
|
var component1Evaluated = false
|
||||||
@@ -26,4 +26,4 @@ fun box(): String {
|
|||||||
// FILE: J.java
|
// FILE: J.java
|
||||||
public class J {
|
public class J {
|
||||||
public static J j() { return null; }
|
public static J j() { return null; }
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -2,7 +2,7 @@
|
|||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// FILE: test.kt
|
// FILE: test.kt
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
private operator fun A.inc() = A()
|
private operator fun A.inc() = A()
|
||||||
@@ -19,4 +19,4 @@ fun box(): String {
|
|||||||
// FILE: A.java
|
// FILE: A.java
|
||||||
public class A {
|
public class A {
|
||||||
public static A n() { return null; }
|
public static A n() { return null; }
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-2
@@ -1,8 +1,9 @@
|
|||||||
|
// !LANGUAGE: -NullabilityAssertionOnExtensionReceiver
|
||||||
// IGNORE_BACKEND: JVM_IR
|
// IGNORE_BACKEND: JVM_IR
|
||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// FILE: test.kt
|
// FILE: test.kt
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// LANGUAGE_VERSION: 1.1
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
operator fun A.inc() = A()
|
operator fun A.inc() = A()
|
||||||
@@ -19,4 +20,4 @@ fun box(): String {
|
|||||||
// FILE: A.java
|
// FILE: A.java
|
||||||
public class A {
|
public class A {
|
||||||
public static A n() { return null; }
|
public static A n() { return null; }
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -2,7 +2,7 @@
|
|||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// FILE: test.kt
|
// FILE: test.kt
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
operator fun A.inc() = A()
|
operator fun A.inc() = A()
|
||||||
@@ -19,4 +19,4 @@ fun box(): String {
|
|||||||
// FILE: A.java
|
// FILE: A.java
|
||||||
public class A {
|
public class A {
|
||||||
public static A n() { return null; }
|
public static A n() { return null; }
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -2,7 +2,7 @@
|
|||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// FILE: test.kt
|
// FILE: test.kt
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
fun String.extension() {}
|
fun String.extension() {}
|
||||||
@@ -15,4 +15,4 @@ fun box(): String {
|
|||||||
// FILE: J.java
|
// FILE: J.java
|
||||||
public class J {
|
public class J {
|
||||||
public static String s() { return null; }
|
public static String s() { return null; }
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -2,7 +2,7 @@
|
|||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// FILE: test.kt
|
// FILE: test.kt
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
inline fun String.extension() {}
|
inline fun String.extension() {}
|
||||||
@@ -17,4 +17,4 @@ fun box(): String {
|
|||||||
// FILE: J.java
|
// FILE: J.java
|
||||||
public class J {
|
public class J {
|
||||||
public static String s() { return null; }
|
public static String s() { return null; }
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -2,7 +2,7 @@
|
|||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// FILE: test.kt
|
// FILE: test.kt
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
class C {
|
class C {
|
||||||
@@ -18,4 +18,4 @@ fun box(): String {
|
|||||||
// FILE: J.java
|
// FILE: J.java
|
||||||
public class J {
|
public class J {
|
||||||
public static String s() { return null; }
|
public static String s() { return null; }
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -2,7 +2,7 @@
|
|||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// FILE: test.kt
|
// FILE: test.kt
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
class C {
|
class C {
|
||||||
@@ -20,4 +20,4 @@ fun box(): String {
|
|||||||
// FILE: J.java
|
// FILE: J.java
|
||||||
public class J {
|
public class J {
|
||||||
public static String s() { return null; }
|
public static String s() { return null; }
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -1,9 +1,9 @@
|
|||||||
// SKIP_JDK6
|
// JVM_TARGET: 1.8
|
||||||
// IGNORE_BACKEND: JVM_IR
|
// IGNORE_BACKEND: JVM_IR
|
||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// FULL_JDK
|
// FULL_JDK
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// LANGUAGE_VERSION: 1.1
|
|
||||||
import java.util.stream.*
|
import java.util.stream.*
|
||||||
|
|
||||||
class B<F> : List<F> {
|
class B<F> : List<F> {
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
|
// !LANGUAGE: -AdditionalBuiltInsMembers
|
||||||
// SKIP_JDK6
|
// SKIP_JDK6
|
||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// LANGUAGE_VERSION: 1.0
|
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// FULL_JDK
|
// FULL_JDK
|
||||||
|
|
||||||
class A(val x: List<String>) : List<String> by x
|
class A(val x: List<String>) : List<String> by x
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// IGNORE_BACKEND: JVM_IR
|
// IGNORE_BACKEND: JVM_IR
|
||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
|
|
||||||
// FILE: foo.kt
|
// FILE: foo.kt
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// IGNORE_BACKEND: JVM_IR
|
// IGNORE_BACKEND: JVM_IR
|
||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
|
|
||||||
// FILE: foo.kt
|
// FILE: foo.kt
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// IGNORE_BACKEND: JVM_IR
|
// IGNORE_BACKEND: JVM_IR
|
||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
|
|
||||||
// FILE: foo.kt
|
// FILE: foo.kt
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
// LANGUAGE_VERSION: 1.2
|
// !LANGUAGE: -ProperVisibilityForCompanionObjectInstanceField
|
||||||
|
|
||||||
inline fun on(body: () -> Any) = body().toString()
|
inline fun on(body: () -> Any) = body().toString()
|
||||||
|
|
||||||
@@ -13,4 +13,4 @@ class A {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fun box() = A().test()
|
fun box() = A().test()
|
||||||
|
|||||||
+1
-3
@@ -1,5 +1,3 @@
|
|||||||
// LANGUAGE_VERSION: 1.3
|
|
||||||
|
|
||||||
inline fun on(body: () -> Any) = body().toString()
|
inline fun on(body: () -> Any) = body().toString()
|
||||||
|
|
||||||
class A {
|
class A {
|
||||||
@@ -13,4 +11,4 @@ class A {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fun box() = A().test()
|
fun box() = A().test()
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
// LANGUAGE_VERSION: 1.2
|
// !LANGUAGE: -ProperVisibilityForCompanionObjectInstanceField
|
||||||
|
|
||||||
interface A {
|
interface A {
|
||||||
fun test() = ok()
|
fun test() = ok()
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
// LANGUAGE_VERSION: 1.3
|
|
||||||
|
|
||||||
interface A {
|
interface A {
|
||||||
fun test() = ok()
|
fun test() = ok()
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -1,6 +1,6 @@
|
|||||||
|
// !LANGUAGE: -ProhibitOperatorMod
|
||||||
|
// !API_VERSION: 1.0
|
||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
|
|
||||||
// LANGUAGE_VERSION: 1.0
|
|
||||||
// FULL_JDK
|
// FULL_JDK
|
||||||
|
|
||||||
import java.math.BigInteger
|
import java.math.BigInteger
|
||||||
@@ -8,4 +8,4 @@ import java.math.BigInteger
|
|||||||
fun box(): String {
|
fun box(): String {
|
||||||
val m = BigInteger.valueOf(-2) % BigInteger.valueOf(3)
|
val m = BigInteger.valueOf(-2) % BigInteger.valueOf(3)
|
||||||
return if (m != BigInteger.valueOf(1)) "Fail: BigInteger(-2) mod BigInteger(3) == $m" else "OK"
|
return if (m != BigInteger.valueOf(1)) "Fail: BigInteger(-2) mod BigInteger(3) == $m" else "OK"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
// IGNORE_BACKEND: JVM_IR
|
// IGNORE_BACKEND: JVM_IR
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// FILE: test.kt
|
// FILE: test.kt
|
||||||
@@ -37,4 +36,4 @@ public class J {
|
|||||||
public static Long LONG_NULL = null;
|
public static Long LONG_NULL = null;
|
||||||
public static Float FLOAT_NULL = null;
|
public static Float FLOAT_NULL = null;
|
||||||
public static Double DOUBLE_NULL = null;
|
public static Double DOUBLE_NULL = null;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-2
@@ -1,5 +1,4 @@
|
|||||||
// IGNORE_BACKEND: JVM_IR
|
// IGNORE_BACKEND: JVM_IR
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
// KOTLIN_CONFIGURATION_FLAGS: +JVM.NO_EXCEPTION_ON_EXPLICIT_EQUALS_FOR_BOXED_NULL
|
// KOTLIN_CONFIGURATION_FLAGS: +JVM.NO_EXCEPTION_ON_EXPLICIT_EQUALS_FOR_BOXED_NULL
|
||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
@@ -38,4 +37,4 @@ public class J {
|
|||||||
public static Long LONG_NULL = null;
|
public static Long LONG_NULL = null;
|
||||||
public static Float FLOAT_NULL = null;
|
public static Float FLOAT_NULL = null;
|
||||||
public static Double DOUBLE_NULL = null;
|
public static Double DOUBLE_NULL = null;
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
-1
@@ -1,4 +1,3 @@
|
|||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
open class Foo {
|
open class Foo {
|
||||||
|
|||||||
Vendored
-1
@@ -1,5 +1,4 @@
|
|||||||
// IGNORE_BACKEND: JVM_IR
|
// IGNORE_BACKEND: JVM_IR
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
class Foo {
|
class Foo {
|
||||||
|
|||||||
-1
@@ -1,5 +1,4 @@
|
|||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
// FILE: J.java
|
// FILE: J.java
|
||||||
|
|||||||
Vendored
-1
@@ -1,4 +1,3 @@
|
|||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
lateinit var bar: String
|
lateinit var bar: String
|
||||||
|
|||||||
+1
-3
@@ -1,5 +1,3 @@
|
|||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
|
|
||||||
fun runNoInline(f: () -> Unit) = f()
|
fun runNoInline(f: () -> Unit) = f()
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
@@ -8,4 +6,4 @@ fun box(): String {
|
|||||||
ok = "OK"
|
ok = "OK"
|
||||||
}
|
}
|
||||||
return ok
|
return ok
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
lateinit var ok: String
|
lateinit var ok: String
|
||||||
run {
|
run {
|
||||||
ok = "OK"
|
ok = "OK"
|
||||||
}
|
}
|
||||||
return ok
|
return ok
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+1
-2
@@ -1,4 +1,3 @@
|
|||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
import kotlin.UninitializedPropertyAccessException
|
import kotlin.UninitializedPropertyAccessException
|
||||||
@@ -20,4 +19,4 @@ fun box(): String {
|
|||||||
catch (e: Throwable) {
|
catch (e: Throwable) {
|
||||||
return "Unexpected exception: ${e::class}"
|
return "Unexpected exception: ${e::class}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-2
@@ -1,4 +1,3 @@
|
|||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
import kotlin.UninitializedPropertyAccessException
|
import kotlin.UninitializedPropertyAccessException
|
||||||
@@ -20,4 +19,4 @@ fun box(): String {
|
|||||||
catch (e: Throwable) {
|
catch (e: Throwable) {
|
||||||
return "Unexpected exception: ${e::class}"
|
return "Unexpected exception: ${e::class}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-2
@@ -1,4 +1,3 @@
|
|||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
import kotlin.UninitializedPropertyAccessException
|
import kotlin.UninitializedPropertyAccessException
|
||||||
@@ -16,4 +15,4 @@ fun box(): String {
|
|||||||
catch (e: Throwable) {
|
catch (e: Throwable) {
|
||||||
return "Unexpected exception: ${e::class}"
|
return "Unexpected exception: ${e::class}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-2
@@ -1,4 +1,3 @@
|
|||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
import kotlin.UninitializedPropertyAccessException
|
import kotlin.UninitializedPropertyAccessException
|
||||||
@@ -16,4 +15,4 @@ fun box(): String {
|
|||||||
catch (e: Throwable) {
|
catch (e: Throwable) {
|
||||||
return "Unexpected exception: ${e::class}"
|
return "Unexpected exception: ${e::class}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-2
@@ -1,4 +1,3 @@
|
|||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// FILE: lateinit.kt
|
// FILE: lateinit.kt
|
||||||
private lateinit var s: String
|
private lateinit var s: String
|
||||||
@@ -24,4 +23,4 @@ fun box(): String {
|
|||||||
return "Unexpected exception: ${e::class}"
|
return "Unexpected exception: ${e::class}"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-3
@@ -1,5 +1,3 @@
|
|||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
|
|
||||||
// FILE: lateinit.kt
|
// FILE: lateinit.kt
|
||||||
private lateinit var s: String
|
private lateinit var s: String
|
||||||
|
|
||||||
@@ -12,4 +10,4 @@ object C {
|
|||||||
fun box(): String {
|
fun box(): String {
|
||||||
C.setS("OK")
|
C.setS("OK")
|
||||||
return C.getS()
|
return C.getS()
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-3
@@ -1,5 +1,3 @@
|
|||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
|
|
||||||
lateinit var ok: String
|
lateinit var ok: String
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
@@ -7,4 +5,4 @@ fun box(): String {
|
|||||||
ok = "OK"
|
ok = "OK"
|
||||||
}
|
}
|
||||||
return ok
|
return ok
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-2
@@ -1,4 +1,3 @@
|
|||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
import kotlin.UninitializedPropertyAccessException
|
import kotlin.UninitializedPropertyAccessException
|
||||||
@@ -17,4 +16,4 @@ fun box(): String {
|
|||||||
catch (e: Throwable) {
|
catch (e: Throwable) {
|
||||||
return "Unexpected exception: ${e::class}"
|
return "Unexpected exception: ${e::class}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-2
@@ -1,4 +1,3 @@
|
|||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
import kotlin.UninitializedPropertyAccessException
|
import kotlin.UninitializedPropertyAccessException
|
||||||
@@ -17,4 +16,4 @@ fun box(): String {
|
|||||||
catch (e: Throwable) {
|
catch (e: Throwable) {
|
||||||
return "Unexpected exception: ${e::class}"
|
return "Unexpected exception: ${e::class}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
// IGNORE_BACKEND: JS_IR
|
// IGNORE_BACKEND: JS_IR
|
||||||
// IGNORE_BACKEND: JS, NATIVE
|
// IGNORE_BACKEND: JS, NATIVE
|
||||||
|
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
import kotlin.test.assertEquals
|
import kotlin.test.assertEquals
|
||||||
|
|
||||||
inline fun <reified T> foo(): T {
|
inline fun <reified T> foo(): T {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
// IGNORE_BACKEND: JVM_IR
|
// IGNORE_BACKEND: JVM_IR
|
||||||
// IGNORE_BACKEND: JS_IR
|
// IGNORE_BACKEND: JS_IR
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
// WITH_REFLECT
|
// WITH_REFLECT
|
||||||
|
|
||||||
// IGNORE_BACKEND: JS
|
// IGNORE_BACKEND: JS
|
||||||
@@ -67,4 +66,4 @@ fun box(): String {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return "OK"
|
return "OK"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
// IGNORE_BACKEND: JVM_IR
|
|
||||||
// LANGUAGE_VERSION: 1.1
|
|
||||||
// FILE: JavaClass.java
|
// FILE: JavaClass.java
|
||||||
|
|
||||||
public class JavaClass {
|
public class JavaClass {
|
||||||
@@ -12,10 +10,6 @@ public class JavaClass {
|
|||||||
return 0.0;
|
return 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Double null0(){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -24,10 +18,9 @@ public class JavaClass {
|
|||||||
fun box(): String {
|
fun box(): String {
|
||||||
val jClass = JavaClass()
|
val jClass = JavaClass()
|
||||||
|
|
||||||
if (jClass.minus0().equals(jClass.plus0())) return "fail 5"
|
if (jClass.minus0().equals(jClass.plus0())) return "fail 1"
|
||||||
|
if (jClass.plus0().equals(jClass.minus0())) return "fail 2"
|
||||||
|
|
||||||
if (jClass.null0().equals(jClass.plus0())) return "fail 6"
|
|
||||||
if (jClass.minus0().equals(jClass.null0())) return "fail 7"
|
|
||||||
return "OK"
|
return "OK"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
// !LANGUAGE: -ThrowNpeOnExplicitEqualsForBoxedNull
|
||||||
|
// IGNORE_BACKEND: JVM_IR
|
||||||
|
// FILE: JavaClass.java
|
||||||
|
|
||||||
|
public class JavaClass {
|
||||||
|
|
||||||
|
public Double minus0(){
|
||||||
|
return -0.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double plus0(){
|
||||||
|
return 0.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double null0(){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// FILE: b.kt
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
val jClass = JavaClass()
|
||||||
|
|
||||||
|
if (jClass.null0().equals(jClass.plus0())) return "fail 6"
|
||||||
|
if (jClass.minus0().equals(jClass.null0())) return "fail 7"
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
// FILE: JavaClass.java
|
|
||||||
|
|
||||||
public class JavaClass {
|
|
||||||
|
|
||||||
public Double minus0(){
|
|
||||||
return -0.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Double plus0(){
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// FILE: b.kt
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
val jClass = JavaClass()
|
|
||||||
|
|
||||||
if (jClass.minus0().equals(jClass.plus0())) return "fail 1"
|
|
||||||
if (jClass.plus0().equals(jClass.minus0())) return "fail 2"
|
|
||||||
|
|
||||||
return "OK"
|
|
||||||
}
|
|
||||||
|
|
||||||
+1
-3
@@ -1,5 +1,3 @@
|
|||||||
// LANGUAGE_VERSION: 1.3
|
|
||||||
|
|
||||||
open class TestProtectedCompanionInClass {
|
open class TestProtectedCompanionInClass {
|
||||||
protected companion object
|
protected companion object
|
||||||
}
|
}
|
||||||
@@ -14,4 +12,4 @@ class TestPrivateCompanionInClass {
|
|||||||
|
|
||||||
interface TestPrivateCompanionInInterface {
|
interface TestPrivateCompanionInInterface {
|
||||||
private companion object
|
private companion object
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
// !LANGUAGE: +ProperVisibilityForCompanionObjectInstanceField
|
|
||||||
|
|
||||||
class TestPrivateCompanion {
|
|
||||||
private companion object Test
|
|
||||||
}
|
|
||||||
|
|
||||||
open class TestProtectedCompanion {
|
|
||||||
protected companion object Test
|
|
||||||
}
|
|
||||||
|
|
||||||
class TestInternalCompanion {
|
|
||||||
internal companion object Test
|
|
||||||
}
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
@kotlin.Metadata
|
|
||||||
public final class TestInternalCompanion$Test {
|
|
||||||
inner class TestInternalCompanion$Test
|
|
||||||
private method <init>(): void
|
|
||||||
public synthetic method <init>(p0: kotlin.jvm.internal.DefaultConstructorMarker): void
|
|
||||||
}
|
|
||||||
|
|
||||||
@kotlin.Metadata
|
|
||||||
public final class TestInternalCompanion {
|
|
||||||
public final static field Test: TestInternalCompanion$Test
|
|
||||||
inner class TestInternalCompanion$Test
|
|
||||||
static method <clinit>(): void
|
|
||||||
public method <init>(): void
|
|
||||||
}
|
|
||||||
|
|
||||||
@kotlin.Metadata
|
|
||||||
final class TestPrivateCompanion$Test {
|
|
||||||
inner class TestPrivateCompanion$Test
|
|
||||||
private method <init>(): void
|
|
||||||
public synthetic method <init>(p0: kotlin.jvm.internal.DefaultConstructorMarker): void
|
|
||||||
}
|
|
||||||
|
|
||||||
@kotlin.Metadata
|
|
||||||
public final class TestPrivateCompanion {
|
|
||||||
private final static field Test: TestPrivateCompanion$Test
|
|
||||||
inner class TestPrivateCompanion$Test
|
|
||||||
static method <clinit>(): void
|
|
||||||
public method <init>(): void
|
|
||||||
}
|
|
||||||
|
|
||||||
@kotlin.Metadata
|
|
||||||
public final class TestProtectedCompanion$Test {
|
|
||||||
inner class TestProtectedCompanion$Test
|
|
||||||
private method <init>(): void
|
|
||||||
public synthetic method <init>(p0: kotlin.jvm.internal.DefaultConstructorMarker): void
|
|
||||||
}
|
|
||||||
|
|
||||||
@kotlin.Metadata
|
|
||||||
public class TestProtectedCompanion {
|
|
||||||
protected final static field Test: TestProtectedCompanion$Test
|
|
||||||
inner class TestProtectedCompanion$Test
|
|
||||||
static method <clinit>(): void
|
|
||||||
public method <init>(): void
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
// LANGUAGE_VERSION: 1.1
|
|
||||||
|
|
||||||
class TestPrivateCompanion {
|
|
||||||
private companion object Test
|
|
||||||
}
|
|
||||||
|
|
||||||
open class TestProtectedCompanion {
|
|
||||||
protected companion object Test
|
|
||||||
}
|
|
||||||
|
|
||||||
class TestInternalCompanion {
|
|
||||||
internal companion object Test
|
|
||||||
}
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
@kotlin.Metadata
|
|
||||||
public final class TestInternalCompanion$Test {
|
|
||||||
inner class TestInternalCompanion$Test
|
|
||||||
private method <init>(): void
|
|
||||||
public synthetic method <init>(p0: kotlin.jvm.internal.DefaultConstructorMarker): void
|
|
||||||
}
|
|
||||||
|
|
||||||
@kotlin.Metadata
|
|
||||||
public final class TestInternalCompanion {
|
|
||||||
public final static field Test: TestInternalCompanion$Test
|
|
||||||
inner class TestInternalCompanion$Test
|
|
||||||
static method <clinit>(): void
|
|
||||||
public method <init>(): void
|
|
||||||
}
|
|
||||||
|
|
||||||
@kotlin.Metadata
|
|
||||||
final class TestPrivateCompanion$Test {
|
|
||||||
inner class TestPrivateCompanion$Test
|
|
||||||
private method <init>(): void
|
|
||||||
public synthetic method <init>(p0: kotlin.jvm.internal.DefaultConstructorMarker): void
|
|
||||||
}
|
|
||||||
|
|
||||||
@kotlin.Metadata
|
|
||||||
public final class TestPrivateCompanion {
|
|
||||||
public final static field Test: TestPrivateCompanion$Test
|
|
||||||
inner class TestPrivateCompanion$Test
|
|
||||||
static method <clinit>(): void
|
|
||||||
public method <init>(): void
|
|
||||||
}
|
|
||||||
|
|
||||||
@kotlin.Metadata
|
|
||||||
public final class TestProtectedCompanion$Test {
|
|
||||||
inner class TestProtectedCompanion$Test
|
|
||||||
private method <init>(): void
|
|
||||||
public synthetic method <init>(p0: kotlin.jvm.internal.DefaultConstructorMarker): void
|
|
||||||
}
|
|
||||||
|
|
||||||
@kotlin.Metadata
|
|
||||||
public class TestProtectedCompanion {
|
|
||||||
public final static field Test: TestProtectedCompanion$Test
|
|
||||||
inner class TestProtectedCompanion$Test
|
|
||||||
static method <clinit>(): void
|
|
||||||
public method <init>(): void
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
|
|
||||||
class TestPrivateCompanion {
|
|
||||||
private companion object Test
|
|
||||||
}
|
|
||||||
|
|
||||||
open class TestProtectedCompanion {
|
|
||||||
protected companion object Test
|
|
||||||
}
|
|
||||||
|
|
||||||
class TestInternalCompanion {
|
|
||||||
internal companion object Test
|
|
||||||
}
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
@kotlin.Metadata
|
|
||||||
public final class TestInternalCompanion$Test {
|
|
||||||
inner class TestInternalCompanion$Test
|
|
||||||
private method <init>(): void
|
|
||||||
public synthetic method <init>(p0: kotlin.jvm.internal.DefaultConstructorMarker): void
|
|
||||||
}
|
|
||||||
|
|
||||||
@kotlin.Metadata
|
|
||||||
public final class TestInternalCompanion {
|
|
||||||
public final static field Test: TestInternalCompanion$Test
|
|
||||||
inner class TestInternalCompanion$Test
|
|
||||||
static method <clinit>(): void
|
|
||||||
public method <init>(): void
|
|
||||||
}
|
|
||||||
|
|
||||||
@kotlin.Metadata
|
|
||||||
final class TestPrivateCompanion$Test {
|
|
||||||
inner class TestPrivateCompanion$Test
|
|
||||||
private method <init>(): void
|
|
||||||
public synthetic method <init>(p0: kotlin.jvm.internal.DefaultConstructorMarker): void
|
|
||||||
}
|
|
||||||
|
|
||||||
@kotlin.Metadata
|
|
||||||
public final class TestPrivateCompanion {
|
|
||||||
public deprecated final static @java.lang.Deprecated field Test: TestPrivateCompanion$Test
|
|
||||||
inner class TestPrivateCompanion$Test
|
|
||||||
static method <clinit>(): void
|
|
||||||
public method <init>(): void
|
|
||||||
}
|
|
||||||
|
|
||||||
@kotlin.Metadata
|
|
||||||
public final class TestProtectedCompanion$Test {
|
|
||||||
inner class TestProtectedCompanion$Test
|
|
||||||
private method <init>(): void
|
|
||||||
public synthetic method <init>(p0: kotlin.jvm.internal.DefaultConstructorMarker): void
|
|
||||||
}
|
|
||||||
|
|
||||||
@kotlin.Metadata
|
|
||||||
public class TestProtectedCompanion {
|
|
||||||
public deprecated final static @java.lang.Deprecated field Test: TestProtectedCompanion$Test
|
|
||||||
inner class TestProtectedCompanion$Test
|
|
||||||
static method <clinit>(): void
|
|
||||||
public method <init>(): void
|
|
||||||
}
|
|
||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
// LANGUAGE_VERSION: 1.0
|
// !LANGUAGE: -InlineConstVals
|
||||||
// FILE: Foo.kt
|
// FILE: Foo.kt
|
||||||
|
|
||||||
private const val OUTER_PRIVATE = 20
|
private const val OUTER_PRIVATE = 20
|
||||||
@@ -18,4 +18,4 @@ class Foo {
|
|||||||
|
|
||||||
// 1 INVOKESTATIC
|
// 1 INVOKESTATIC
|
||||||
// 1 PUTSTATIC
|
// 1 PUTSTATIC
|
||||||
// 2 GETSTATIC
|
// 2 GETSTATIC
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// LANGUAGE_VERSION: 1.0
|
// !LANGUAGE: -InlineConstVals
|
||||||
|
|
||||||
const val z = 0
|
const val z = 0
|
||||||
|
|
||||||
@@ -6,4 +6,4 @@ fun a() {
|
|||||||
val x = z
|
val x = z
|
||||||
}
|
}
|
||||||
|
|
||||||
// 1 GETSTATIC NoInlineKt.z : I
|
// 1 GETSTATIC NoInlineKt.z : I
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// LANGUAGE_VERSION: 1.0
|
// !LANGUAGE: -InlineConstVals
|
||||||
|
|
||||||
const val z = 0
|
const val z = 0
|
||||||
|
|
||||||
@@ -7,4 +7,4 @@ fun a() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 1 GETSTATIC NoInlineInCmpKt.z : I
|
// 1 GETSTATIC NoInlineInCmpKt.z : I
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
// LANGUAGE_VERSION: 1.0
|
// !LANGUAGE: -InlineConstVals
|
||||||
// FILE: test.kt
|
// FILE: test.kt
|
||||||
fun test1(a: A) = a.X
|
fun test1(a: A) = a.X
|
||||||
fun test2(a: A) = 1 + a.X
|
fun test2(a: A) = 1 + a.X
|
||||||
@@ -12,4 +12,4 @@ public class A {
|
|||||||
// @TestKt.class:
|
// @TestKt.class:
|
||||||
// 0 42
|
// 0 42
|
||||||
// 0 43
|
// 0 43
|
||||||
// 3 GETFIELD A.X
|
// 3 GETFIELD A.X
|
||||||
|
|||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
// LANGUAGE_VERSION: 1.1
|
|
||||||
// FILE: test.kt
|
|
||||||
fun test1(a: A) = a.X
|
|
||||||
fun test2(a: A) = 1 + a.X
|
|
||||||
fun test3(a: A) = 1 < a.X
|
|
||||||
|
|
||||||
// FILE: A.java
|
|
||||||
public class A {
|
|
||||||
public final int X = 42;
|
|
||||||
}
|
|
||||||
|
|
||||||
// @TestKt.class:
|
|
||||||
// 0 42
|
|
||||||
// 0 43
|
|
||||||
// 3 GETFIELD A.X
|
|
||||||
+3
-2
@@ -1,4 +1,4 @@
|
|||||||
// LANGUAGE_VERSION: 1.0
|
// !LANGUAGE: -InlineConstVals
|
||||||
|
|
||||||
const val one = 1
|
const val one = 1
|
||||||
const val two = 2
|
const val two = 2
|
||||||
@@ -8,4 +8,5 @@ fun test1() {
|
|||||||
val p = 1
|
val p = 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 1 IF
|
|
||||||
|
// 1 IF
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// LANGUAGE_VERSION: 1.0
|
// !LANGUAGE: -InlineConstVals
|
||||||
// FILE: first/Foo.java
|
// FILE: first/Foo.java
|
||||||
|
|
||||||
package first;
|
package first;
|
||||||
@@ -20,4 +20,4 @@ class Bar : Foo() {
|
|||||||
// @second/BarKt.class
|
// @second/BarKt.class
|
||||||
// 1 INVOKESTATIC
|
// 1 INVOKESTATIC
|
||||||
// 0 GETSTATIC
|
// 0 GETSTATIC
|
||||||
// 1 BIPUSH 42
|
// 1 BIPUSH 42
|
||||||
|
|||||||
Vendored
+1
-3
@@ -1,5 +1,3 @@
|
|||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
|
|
||||||
fun almostAlwaysTrue() = true
|
fun almostAlwaysTrue() = true
|
||||||
|
|
||||||
fun runNoInline(f: () -> Unit) = f()
|
fun runNoInline(f: () -> Unit) = f()
|
||||||
@@ -23,4 +21,4 @@ fun test() {
|
|||||||
|
|
||||||
// 0 IFNULL
|
// 0 IFNULL
|
||||||
// 3 IFNONNULL
|
// 3 IFNONNULL
|
||||||
// 3 throwUninitializedPropertyAccessException
|
// 3 throwUninitializedPropertyAccessException
|
||||||
|
|||||||
+1
-3
@@ -1,5 +1,3 @@
|
|||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
|
|
||||||
fun almostAlwaysTrue() = true
|
fun almostAlwaysTrue() = true
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
@@ -16,4 +14,4 @@ fun test() {
|
|||||||
|
|
||||||
// 0 IFNULL
|
// 0 IFNULL
|
||||||
// 1 IFNONNULL
|
// 1 IFNONNULL
|
||||||
// 1 throwUninitializedPropertyAccessException
|
// 1 throwUninitializedPropertyAccessException
|
||||||
|
|||||||
+1
-3
@@ -1,5 +1,3 @@
|
|||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
lateinit var z: String
|
lateinit var z: String
|
||||||
run {
|
run {
|
||||||
@@ -9,4 +7,4 @@ fun test() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 0 IFNULL
|
// 0 IFNULL
|
||||||
// 0 IFNONNULL
|
// 0 IFNONNULL
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
// LANGUAGE_VERSION: 1.0
|
// !LANGUAGE: -InlineConstVals
|
||||||
|
|
||||||
const val y = "cde"
|
const val y = "cde"
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
// IGNORE_BACKEND: NATIVE
|
// IGNORE_BACKEND: NATIVE
|
||||||
// FILE: A.kt
|
// FILE: A.kt
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
|
|
||||||
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||||
@file:JvmPackageName("bar")
|
@file:JvmPackageName("bar")
|
||||||
@@ -13,7 +12,6 @@ var v: Int = 1
|
|||||||
inline fun i(block: () -> Unit) = block()
|
inline fun i(block: () -> Unit) = block()
|
||||||
|
|
||||||
// FILE: B.kt
|
// FILE: B.kt
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
|
|
||||||
import foo.*
|
import foo.*
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
// IGNORE_BACKEND: NATIVE
|
// IGNORE_BACKEND: NATIVE
|
||||||
// FILE: A.kt
|
// FILE: A.kt
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
|
|
||||||
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||||
@file:JvmPackageName("bar")
|
@file:JvmPackageName("bar")
|
||||||
@@ -10,7 +9,6 @@ fun f() = "OK"
|
|||||||
var v: Int = 1
|
var v: Int = 1
|
||||||
|
|
||||||
// FILE: B.kt
|
// FILE: B.kt
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
v = 2
|
v = 2
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
// IGNORE_BACKEND: NATIVE
|
// IGNORE_BACKEND: NATIVE
|
||||||
// FILE: A.kt
|
// FILE: A.kt
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
|
|
||||||
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||||
@file:JvmPackageName("bar")
|
@file:JvmPackageName("bar")
|
||||||
@@ -12,7 +11,6 @@ fun f() = "OK"
|
|||||||
var v: Int = 1
|
var v: Int = 1
|
||||||
|
|
||||||
// FILE: B.kt
|
// FILE: B.kt
|
||||||
// LANGUAGE_VERSION: 1.2
|
|
||||||
|
|
||||||
import foo.*
|
import foo.*
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -322,9 +322,9 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxAga
|
|||||||
runTest("compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCall.kt");
|
runTest("compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCall.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("explicitEqualsCall_lv12.kt")
|
@TestMetadata("explicitEqualsCallNull.kt")
|
||||||
public void testExplicitEqualsCall_lv12() throws Exception {
|
public void testExplicitEqualsCallNull() throws Exception {
|
||||||
runTest("compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCall_lv12.kt");
|
runTest("compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCallNull.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("float.kt")
|
@TestMetadata("float.kt")
|
||||||
|
|||||||
-15
@@ -108,21 +108,6 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
|
|||||||
runTest("compiler/testData/codegen/bytecodeListing/InlineOnlyPropertyMultifile.kt");
|
runTest("compiler/testData/codegen/bytecodeListing/InlineOnlyPropertyMultifile.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("invisibleCompanionObject.kt")
|
|
||||||
public void testInvisibleCompanionObject() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/bytecodeListing/invisibleCompanionObject.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("invisibleCompanionObject_lv11.kt")
|
|
||||||
public void testInvisibleCompanionObject_lv11() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/bytecodeListing/invisibleCompanionObject_lv11.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("invisibleCompanionObject_lv12.kt")
|
|
||||||
public void testInvisibleCompanionObject_lv12() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/bytecodeListing/invisibleCompanionObject_lv12.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("jvmOverloadsAndParametersAnnotations.kt")
|
@TestMetadata("jvmOverloadsAndParametersAnnotations.kt")
|
||||||
public void testJvmOverloadsAndParametersAnnotations() throws Exception {
|
public void testJvmOverloadsAndParametersAnnotations() throws Exception {
|
||||||
runTest("compiler/testData/codegen/bytecodeListing/jvmOverloadsAndParametersAnnotations.kt");
|
runTest("compiler/testData/codegen/bytecodeListing/jvmOverloadsAndParametersAnnotations.kt");
|
||||||
|
|||||||
@@ -1030,11 +1030,6 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
|
|||||||
runTest("compiler/testData/codegen/bytecodeText/constants/noInlineNonStaticJavaField_lv10.kt");
|
runTest("compiler/testData/codegen/bytecodeText/constants/noInlineNonStaticJavaField_lv10.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("noInlineNonStaticJavaField_lv11.kt")
|
|
||||||
public void testNoInlineNonStaticJavaField_lv11() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/bytecodeText/constants/noInlineNonStaticJavaField_lv11.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("nullableByteAndShort.kt")
|
@TestMetadata("nullableByteAndShort.kt")
|
||||||
public void testNullableByteAndShort() throws Exception {
|
public void testNullableByteAndShort() throws Exception {
|
||||||
runTest("compiler/testData/codegen/bytecodeText/constants/nullableByteAndShort.kt");
|
runTest("compiler/testData/codegen/bytecodeText/constants/nullableByteAndShort.kt");
|
||||||
|
|||||||
Generated
+3
-3
@@ -322,9 +322,9 @@ public class IrBlackBoxAgainstJavaCodegenTestGenerated extends AbstractIrBlackBo
|
|||||||
runTest("compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCall.kt");
|
runTest("compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCall.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("explicitEqualsCall_lv12.kt")
|
@TestMetadata("explicitEqualsCallNull.kt")
|
||||||
public void testExplicitEqualsCall_lv12() throws Exception {
|
public void testExplicitEqualsCallNull() throws Exception {
|
||||||
runTest("compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCall_lv12.kt");
|
runTest("compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCallNull.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("float.kt")
|
@TestMetadata("float.kt")
|
||||||
|
|||||||
Reference in New Issue
Block a user