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,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
@@ -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
@@ -1,5 +1,4 @@
// IGNORE_BACKEND: JVM_IR // IGNORE_BACKEND: JVM_IR
// LANGUAGE_VERSION: 1.2
var result = "" var result = ""
@@ -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,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,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,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,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"
@@ -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 {
@@ -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)
+1 -1
View File
@@ -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
View File
@@ -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 {
@@ -1,5 +1,4 @@
// IGNORE_BACKEND: JVM_IR // IGNORE_BACKEND: JVM_IR
// LANGUAGE_VERSION: 1.2
enum class A { enum class A {
X { X {
@@ -1,5 +1,4 @@
// IGNORE_BACKEND: JVM_IR // IGNORE_BACKEND: JVM_IR
// LANGUAGE_VERSION: 1.2
enum class A { enum class A {
X { X {
@@ -1,5 +1,4 @@
// IGNORE_BACKEND: JVM_IR // IGNORE_BACKEND: JVM_IR
// LANGUAGE_VERSION: 1.2
enum class A { enum class A {
X { X {
@@ -1,5 +1,3 @@
// LANGUAGE_VERSION: 1.2
enum class A { enum class A {
X { X {
val x = "OK" val x = "OK"
@@ -1,5 +1,4 @@
// IGNORE_BACKEND: JVM_IR // IGNORE_BACKEND: JVM_IR
// LANGUAGE_VERSION: 1.2
enum class X { enum class X {
B { B {
@@ -1,5 +1,4 @@
// IGNORE_BACKEND: JVM_IR // IGNORE_BACKEND: JVM_IR
// LANGUAGE_VERSION: 1.2
enum class X { enum class X {
B { B {
@@ -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
@@ -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()
@@ -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()
@@ -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()
@@ -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() {}
@@ -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() {}
@@ -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 {
@@ -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 {
+2 -2
View File
@@ -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
@@ -1,4 +1,4 @@
// LANGUAGE_VERSION: 1.2 // !LANGUAGE: -ProperVisibilityForCompanionObjectInstanceField
inline fun on(body: () -> Any) = body().toString() inline fun on(body: () -> Any) = body().toString()
@@ -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 {
@@ -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()
@@ -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
@@ -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
@@ -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
@@ -1,4 +1,3 @@
// LANGUAGE_VERSION: 1.2
// WITH_RUNTIME // WITH_RUNTIME
open class Foo { open class Foo {
@@ -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,5 +1,4 @@
// TARGET_BACKEND: JVM // TARGET_BACKEND: JVM
// LANGUAGE_VERSION: 1.2
// WITH_RUNTIME // WITH_RUNTIME
// FILE: J.java // FILE: J.java
@@ -1,4 +1,3 @@
// LANGUAGE_VERSION: 1.2
// WITH_RUNTIME // WITH_RUNTIME
lateinit var bar: String lateinit var bar: String
@@ -1,5 +1,3 @@
// LANGUAGE_VERSION: 1.2
fun runNoInline(f: () -> Unit) = f() fun runNoInline(f: () -> Unit) = f()
fun box(): String { fun box(): String {
@@ -1,5 +1,3 @@
// LANGUAGE_VERSION: 1.2
fun box(): String { fun box(): String {
lateinit var ok: String lateinit var ok: String
run { run {
@@ -1,4 +1,3 @@
// LANGUAGE_VERSION: 1.2
// WITH_RUNTIME // WITH_RUNTIME
import kotlin.UninitializedPropertyAccessException import kotlin.UninitializedPropertyAccessException
@@ -1,4 +1,3 @@
// LANGUAGE_VERSION: 1.2
// WITH_RUNTIME // WITH_RUNTIME
import kotlin.UninitializedPropertyAccessException import kotlin.UninitializedPropertyAccessException
@@ -1,4 +1,3 @@
// LANGUAGE_VERSION: 1.2
// WITH_RUNTIME // WITH_RUNTIME
import kotlin.UninitializedPropertyAccessException import kotlin.UninitializedPropertyAccessException
@@ -1,4 +1,3 @@
// LANGUAGE_VERSION: 1.2
// WITH_RUNTIME // WITH_RUNTIME
import kotlin.UninitializedPropertyAccessException import kotlin.UninitializedPropertyAccessException
@@ -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
@@ -1,5 +1,3 @@
// LANGUAGE_VERSION: 1.2
// FILE: lateinit.kt // FILE: lateinit.kt
private lateinit var s: String private lateinit var s: String
@@ -1,5 +1,3 @@
// LANGUAGE_VERSION: 1.2
lateinit var ok: String lateinit var ok: String
fun box(): String { fun box(): String {
@@ -1,4 +1,3 @@
// LANGUAGE_VERSION: 1.2
// WITH_RUNTIME // WITH_RUNTIME
import kotlin.UninitializedPropertyAccessException import kotlin.UninitializedPropertyAccessException
@@ -1,4 +1,3 @@
// LANGUAGE_VERSION: 1.2
// WITH_RUNTIME // WITH_RUNTIME
import kotlin.UninitializedPropertyAccessException import kotlin.UninitializedPropertyAccessException
@@ -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
@@ -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,5 +1,3 @@
// LANGUAGE_VERSION: 1.3
open class TestProtectedCompanionInClass { open class TestProtectedCompanionInClass {
protected companion object protected 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
}
@@ -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
@@ -1,4 +1,4 @@
// LANGUAGE_VERSION: 1.0 // !LANGUAGE: -InlineConstVals
const val z = 0 const val z = 0
@@ -1,4 +1,4 @@
// LANGUAGE_VERSION: 1.0 // !LANGUAGE: -InlineConstVals
const val z = 0 const val z = 0
@@ -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
@@ -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
@@ -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;
@@ -1,5 +1,3 @@
// LANGUAGE_VERSION: 1.2
fun almostAlwaysTrue() = true fun almostAlwaysTrue() = true
fun runNoInline(f: () -> Unit) = f() fun runNoInline(f: () -> Unit) = f()
@@ -1,5 +1,3 @@
// LANGUAGE_VERSION: 1.2
fun almostAlwaysTrue() = true fun almostAlwaysTrue() = true
fun test() { fun test() {
@@ -1,5 +1,3 @@
// LANGUAGE_VERSION: 1.2
fun test() { fun test() {
lateinit var z: String lateinit var z: String
run { run {
@@ -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.*
@@ -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")
@@ -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");
@@ -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")