diff --git a/compiler/testData/codegen/asmLike/receiverMangling/deepNoinlineWithLabels_after.kt b/compiler/testData/codegen/asmLike/receiverMangling/deepNoinlineWithLabels_after.kt index fada2bb711a..222312d4950 100644 --- a/compiler/testData/codegen/asmLike/receiverMangling/deepNoinlineWithLabels_after.kt +++ b/compiler/testData/codegen/asmLike/receiverMangling/deepNoinlineWithLabels_after.kt @@ -1,5 +1,5 @@ +// !LANGUAGE: +NewCapturedReceiverFieldNamingConvention // LOCAL_VARIABLE_TABLE -// LANGUAGE_VERSION: 1.3 fun String.foo(count: Int) { val x = false @@ -15,4 +15,4 @@ fun String.foo(count: Int) { } } -fun block(block: Long.() -> Unit) = 5L.block() \ No newline at end of file +fun block(block: Long.() -> Unit) = 5L.block() diff --git a/compiler/testData/codegen/asmLike/receiverMangling/deepNoinline_after.kt b/compiler/testData/codegen/asmLike/receiverMangling/deepNoinline_after.kt index 9709e206783..1b56d8531e3 100644 --- a/compiler/testData/codegen/asmLike/receiverMangling/deepNoinline_after.kt +++ b/compiler/testData/codegen/asmLike/receiverMangling/deepNoinline_after.kt @@ -1,5 +1,5 @@ +// !LANGUAGE: +NewCapturedReceiverFieldNamingConvention // LOCAL_VARIABLE_TABLE -// LANGUAGE_VERSION: 1.3 fun String.foo(count: Int) { val x = false @@ -15,4 +15,4 @@ fun String.foo(count: Int) { } } -fun block(block: Long.() -> Unit) = 5L.block() \ No newline at end of file +fun block(block: Long.() -> Unit) = 5L.block() diff --git a/compiler/testData/codegen/box/callableReference/bound/emptyLHS.kt b/compiler/testData/codegen/box/callableReference/bound/emptyLHS.kt index d14914a0157..8618214c0df 100644 --- a/compiler/testData/codegen/box/callableReference/bound/emptyLHS.kt +++ b/compiler/testData/codegen/box/callableReference/bound/emptyLHS.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// LANGUAGE_VERSION: 1.2 var result = "" diff --git a/compiler/testData/codegen/box/collectionLiterals/collectionLiteralsInArgumentPosition.kt b/compiler/testData/codegen/box/collectionLiterals/collectionLiteralsInArgumentPosition.kt index 63b1103d7a5..43917839098 100644 --- a/compiler/testData/codegen/box/collectionLiterals/collectionLiteralsInArgumentPosition.kt +++ b/compiler/testData/codegen/box/collectionLiterals/collectionLiteralsInArgumentPosition.kt @@ -1,6 +1,5 @@ // IGNORE_BACKEND: JVM_IR // IGNORE_BACKEND: JS_IR -// LANGUAGE_VERSION: 1.2 // WITH_REFLECT // IGNORE_BACKEND: JS diff --git a/compiler/testData/codegen/box/collectionLiterals/collectionLiteralsWithConstants.kt b/compiler/testData/codegen/box/collectionLiterals/collectionLiteralsWithConstants.kt index f409f02fa9b..3d2aba9343c 100644 --- a/compiler/testData/codegen/box/collectionLiterals/collectionLiteralsWithConstants.kt +++ b/compiler/testData/codegen/box/collectionLiterals/collectionLiteralsWithConstants.kt @@ -1,6 +1,5 @@ // IGNORE_BACKEND: JVM_IR // IGNORE_BACKEND: JS_IR -// LANGUAGE_VERSION: 1.2 // WITH_REFLECT // IGNORE_BACKEND: JS @@ -37,4 +36,4 @@ fun box(): String { } return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/collectionLiterals/collectionLiteralsWithVarargs.kt b/compiler/testData/codegen/box/collectionLiterals/collectionLiteralsWithVarargs.kt index fbe60da3ef0..d3afb5808a7 100644 --- a/compiler/testData/codegen/box/collectionLiterals/collectionLiteralsWithVarargs.kt +++ b/compiler/testData/codegen/box/collectionLiterals/collectionLiteralsWithVarargs.kt @@ -1,6 +1,5 @@ // IGNORE_BACKEND: JVM_IR // IGNORE_BACKEND: JS_IR -// LANGUAGE_VERSION: 1.2 // WITH_REFLECT // IGNORE_BACKEND: JS diff --git a/compiler/testData/codegen/box/collectionLiterals/defaultAnnotationParameterValues.kt b/compiler/testData/codegen/box/collectionLiterals/defaultAnnotationParameterValues.kt index 90663daccd7..71374c29af9 100644 --- a/compiler/testData/codegen/box/collectionLiterals/defaultAnnotationParameterValues.kt +++ b/compiler/testData/codegen/box/collectionLiterals/defaultAnnotationParameterValues.kt @@ -1,6 +1,5 @@ // IGNORE_BACKEND: JVM_IR // IGNORE_BACKEND: JS_IR -// LANGUAGE_VERSION: 1.2 // WITH_REFLECT // IGNORE_BACKEND: JS @@ -39,4 +38,4 @@ fun box(): String { check(e.contentEquals(doubleArrayOf(1.0)), "Fail 5: ${e.joinToString()}") "OK" } -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/compatibility/dataClassEqualsHashCodeToString.kt b/compiler/testData/codegen/box/compatibility/dataClassEqualsHashCodeToString.kt index cb744e31332..a2f0f202bab 100644 --- a/compiler/testData/codegen/box/compatibility/dataClassEqualsHashCodeToString.kt +++ b/compiler/testData/codegen/box/compatibility/dataClassEqualsHashCodeToString.kt @@ -1,6 +1,6 @@ +// !LANGUAGE: -DataClassInheritance // IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JVM_IR -// LANGUAGE_VERSION: 1.0 data class Foo(val s: String) diff --git a/compiler/testData/codegen/box/compatibility/privateCompanionObject.kt b/compiler/testData/codegen/box/compatibility/privateCompanionObject.kt index 76e0e56753c..0e380040c7d 100644 --- a/compiler/testData/codegen/box/compatibility/privateCompanionObject.kt +++ b/compiler/testData/codegen/box/compatibility/privateCompanionObject.kt @@ -1,5 +1,3 @@ -// LANGUAGE_VERSION: 1.3 - class Test { private companion object { val res = "OK" diff --git a/compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayVarUpdatedInLoopBody12.kt b/compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayVarUpdatedInLoopBody12.kt index 002b09c294d..28638e6bbed 100644 --- a/compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayVarUpdatedInLoopBody12.kt +++ b/compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayVarUpdatedInLoopBody12.kt @@ -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" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayVarUpdatedInLoopBody13.kt b/compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayVarUpdatedInLoopBody13.kt index 6b256bcc1bb..dc0361b2868 100644 --- a/compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayVarUpdatedInLoopBody13.kt +++ b/compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayVarUpdatedInLoopBody13.kt @@ -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" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/dataClasses/copy/kt12708.kt b/compiler/testData/codegen/box/dataClasses/copy/kt12708.kt index e3c5e6485b9..7ad1584b800 100644 --- a/compiler/testData/codegen/box/dataClasses/copy/kt12708.kt +++ b/compiler/testData/codegen/box/dataClasses/copy/kt12708.kt @@ -1,4 +1,4 @@ -// LANGUAGE_VERSION: 1.1 +// !LANGUAGE: -ProhibitDataClassesOverridingCopy fun box(): String { val a: A = B(1) diff --git a/compiler/testData/codegen/box/delegation/hiddenSuperOverrideIn1.0.kt b/compiler/testData/codegen/box/delegation/hiddenSuperOverrideIn1.0.kt index 52dd706636f..e3efc096e99 100644 --- a/compiler/testData/codegen/box/delegation/hiddenSuperOverrideIn1.0.kt +++ b/compiler/testData/codegen/box/delegation/hiddenSuperOverrideIn1.0.kt @@ -1,5 +1,3 @@ -// LANGUAGE_VERSION: 1.0 - public interface Base { fun test() = "base fail" } diff --git a/compiler/testData/codegen/box/delegation/simple1.0.kt b/compiler/testData/codegen/box/delegation/simple1.0.kt index 36e1d2a5f92..7377ab053ca 100644 --- a/compiler/testData/codegen/box/delegation/simple1.0.kt +++ b/compiler/testData/codegen/box/delegation/simple1.0.kt @@ -1,6 +1,6 @@ +// !LANGUAGE: -NoDelegationToJavaDefaultInterfaceMembers // SKIP_JDK6 // TARGET_BACKEND: JVM -// LANGUAGE_VERSION: 1.0 // FILE: Base.java public interface Base { diff --git a/compiler/testData/codegen/box/enum/deepInnerClassInEnumEntryClass.kt b/compiler/testData/codegen/box/enum/deepInnerClassInEnumEntryClass.kt index d8a2035b3a3..eec200eac1d 100644 --- a/compiler/testData/codegen/box/enum/deepInnerClassInEnumEntryClass.kt +++ b/compiler/testData/codegen/box/enum/deepInnerClassInEnumEntryClass.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// LANGUAGE_VERSION: 1.2 enum class A { X { @@ -22,4 +21,4 @@ enum class A { abstract val test: String } -fun box() = A.X.test \ No newline at end of file +fun box() = A.X.test diff --git a/compiler/testData/codegen/box/enum/deepInnerClassInEnumEntryClass2.kt b/compiler/testData/codegen/box/enum/deepInnerClassInEnumEntryClass2.kt index a751690a380..d9b2b8cb42e 100644 --- a/compiler/testData/codegen/box/enum/deepInnerClassInEnumEntryClass2.kt +++ b/compiler/testData/codegen/box/enum/deepInnerClassInEnumEntryClass2.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// LANGUAGE_VERSION: 1.2 enum class A { X { @@ -21,4 +20,4 @@ enum class A { abstract val test: String } -fun box() = A.X.test \ No newline at end of file +fun box() = A.X.test diff --git a/compiler/testData/codegen/box/enum/innerClassInEnumEntryClass.kt b/compiler/testData/codegen/box/enum/innerClassInEnumEntryClass.kt index 6ca116ac3c6..181ef811eaa 100644 --- a/compiler/testData/codegen/box/enum/innerClassInEnumEntryClass.kt +++ b/compiler/testData/codegen/box/enum/innerClassInEnumEntryClass.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// LANGUAGE_VERSION: 1.2 enum class A { X { @@ -18,4 +17,4 @@ enum class A { abstract val test: String } -fun box() = A.X.test \ No newline at end of file +fun box() = A.X.test diff --git a/compiler/testData/codegen/box/enum/innerClassMethodInEnumEntryClass.kt b/compiler/testData/codegen/box/enum/innerClassMethodInEnumEntryClass.kt index c6cfd3307bf..fcce8673a2e 100644 --- a/compiler/testData/codegen/box/enum/innerClassMethodInEnumEntryClass.kt +++ b/compiler/testData/codegen/box/enum/innerClassMethodInEnumEntryClass.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// LANGUAGE_VERSION: 1.2 enum class A { X { @@ -17,4 +16,4 @@ enum class A { abstract val test: String } -fun box() = A.X.test \ No newline at end of file +fun box() = A.X.test diff --git a/compiler/testData/codegen/box/enum/innerClassMethodInEnumEntryClass2.kt b/compiler/testData/codegen/box/enum/innerClassMethodInEnumEntryClass2.kt index 2868f51c1e0..38a1ffc04f6 100644 --- a/compiler/testData/codegen/box/enum/innerClassMethodInEnumEntryClass2.kt +++ b/compiler/testData/codegen/box/enum/innerClassMethodInEnumEntryClass2.kt @@ -1,5 +1,3 @@ -// LANGUAGE_VERSION: 1.2 - enum class A { X { val x = "OK" @@ -16,4 +14,4 @@ enum class A { abstract val test: String } -fun box() = A.X.test \ No newline at end of file +fun box() = A.X.test diff --git a/compiler/testData/codegen/box/enum/kt7257_boundReference1.kt b/compiler/testData/codegen/box/enum/kt7257_boundReference1.kt index 818388b1003..a7008b03c36 100644 --- a/compiler/testData/codegen/box/enum/kt7257_boundReference1.kt +++ b/compiler/testData/codegen/box/enum/kt7257_boundReference1.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// LANGUAGE_VERSION: 1.2 enum class X { B { @@ -19,4 +18,4 @@ enum class X { abstract val value: String } -fun box() = X.B.value \ No newline at end of file +fun box() = X.B.value diff --git a/compiler/testData/codegen/box/enum/kt7257_boundReferenceWithImplicitReceiver.kt b/compiler/testData/codegen/box/enum/kt7257_boundReferenceWithImplicitReceiver.kt index aa74fbda119..06f2a49dd23 100644 --- a/compiler/testData/codegen/box/enum/kt7257_boundReferenceWithImplicitReceiver.kt +++ b/compiler/testData/codegen/box/enum/kt7257_boundReferenceWithImplicitReceiver.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// LANGUAGE_VERSION: 1.2 enum class X { B { @@ -13,4 +12,4 @@ enum class X { abstract val test: String } -fun box() = X.B.test \ No newline at end of file +fun box() = X.B.test diff --git a/compiler/testData/codegen/box/javaInterop/notNullAssertions/destructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12.kt b/compiler/testData/codegen/box/javaInterop/notNullAssertions/destructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12.kt index 47e66d0f4d8..07427001eaa 100644 --- a/compiler/testData/codegen/box/javaInterop/notNullAssertions/destructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12.kt +++ b/compiler/testData/codegen/box/javaInterop/notNullAssertions/destructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12.kt @@ -2,7 +2,7 @@ // TARGET_BACKEND: JVM // WITH_RUNTIME // FILE: test.kt -// LANGUAGE_VERSION: 1.2 + import kotlin.test.* var component1Evaluated = false @@ -26,4 +26,4 @@ fun box(): String { // FILE: J.java public class J { public static J j() { return null; } -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12.kt b/compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12.kt index 31ade7a2087..a2d61253fc3 100644 --- a/compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12.kt +++ b/compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12.kt @@ -2,7 +2,7 @@ // TARGET_BACKEND: JVM // FILE: test.kt // WITH_RUNTIME -// LANGUAGE_VERSION: 1.2 + import kotlin.test.* private operator fun A.inc() = A() @@ -19,4 +19,4 @@ fun box(): String { // FILE: A.java public class A { public static A n() { return null; } -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiver_lv11.kt b/compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiver_lv11.kt index 6a329f8aad0..6bbf5750e6b 100644 --- a/compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiver_lv11.kt +++ b/compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiver_lv11.kt @@ -1,8 +1,9 @@ +// !LANGUAGE: -NullabilityAssertionOnExtensionReceiver // IGNORE_BACKEND: JVM_IR // TARGET_BACKEND: JVM // FILE: test.kt // WITH_RUNTIME -// LANGUAGE_VERSION: 1.1 + import kotlin.test.* operator fun A.inc() = A() @@ -19,4 +20,4 @@ fun box(): String { // FILE: A.java public class A { public static A n() { return null; } -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiver_lv12.kt b/compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiver_lv12.kt index c5eefb5fd97..9a7bc4582ce 100644 --- a/compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiver_lv12.kt +++ b/compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiver_lv12.kt @@ -2,7 +2,7 @@ // TARGET_BACKEND: JVM // FILE: test.kt // WITH_RUNTIME -// LANGUAGE_VERSION: 1.2 + import kotlin.test.* operator fun A.inc() = A() @@ -19,4 +19,4 @@ fun box(): String { // FILE: A.java public class A { public static A n() { return null; } -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnExtensionReceiver_lv12.kt b/compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnExtensionReceiver_lv12.kt index f5f55286314..a497f07939f 100644 --- a/compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnExtensionReceiver_lv12.kt +++ b/compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnExtensionReceiver_lv12.kt @@ -2,7 +2,7 @@ // TARGET_BACKEND: JVM // WITH_RUNTIME // FILE: test.kt -// LANGUAGE_VERSION: 1.2 + import kotlin.test.* fun String.extension() {} @@ -15,4 +15,4 @@ fun box(): String { // FILE: J.java public class J { public static String s() { return null; } -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnInlineFunExtensionReceiver_lv12.kt b/compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnInlineFunExtensionReceiver_lv12.kt index f7ca7aa1b8a..fb0bb441078 100644 --- a/compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnInlineFunExtensionReceiver_lv12.kt +++ b/compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnInlineFunExtensionReceiver_lv12.kt @@ -2,7 +2,7 @@ // TARGET_BACKEND: JVM // WITH_RUNTIME // FILE: test.kt -// LANGUAGE_VERSION: 1.2 + import kotlin.test.* inline fun String.extension() {} @@ -17,4 +17,4 @@ fun box(): String { // FILE: J.java public class J { public static String s() { return null; } -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnMemberExtensionReceiver_lv12.kt b/compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnMemberExtensionReceiver_lv12.kt index 2df5010baf7..4848d4cc32e 100644 --- a/compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnMemberExtensionReceiver_lv12.kt +++ b/compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnMemberExtensionReceiver_lv12.kt @@ -2,7 +2,7 @@ // TARGET_BACKEND: JVM // WITH_RUNTIME // FILE: test.kt -// LANGUAGE_VERSION: 1.2 + import kotlin.test.* class C { @@ -18,4 +18,4 @@ fun box(): String { // FILE: J.java public class J { public static String s() { return null; } -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnPrivateMemberExtensionReceiver_lv12.kt b/compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnPrivateMemberExtensionReceiver_lv12.kt index d413c40ee04..8e3bfcf6b9e 100644 --- a/compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnPrivateMemberExtensionReceiver_lv12.kt +++ b/compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnPrivateMemberExtensionReceiver_lv12.kt @@ -2,7 +2,7 @@ // TARGET_BACKEND: JVM // WITH_RUNTIME // FILE: test.kt -// LANGUAGE_VERSION: 1.2 + import kotlin.test.* class C { @@ -20,4 +20,4 @@ fun box(): String { // FILE: J.java public class J { public static String s() { return null; } -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/jdk/stream.kt b/compiler/testData/codegen/box/jdk/stream.kt index ab89a4a58cc..bcf092696e0 100644 --- a/compiler/testData/codegen/box/jdk/stream.kt +++ b/compiler/testData/codegen/box/jdk/stream.kt @@ -1,9 +1,9 @@ -// SKIP_JDK6 +// JVM_TARGET: 1.8 // IGNORE_BACKEND: JVM_IR // TARGET_BACKEND: JVM // FULL_JDK // WITH_RUNTIME -// LANGUAGE_VERSION: 1.1 + import java.util.stream.* class B : List { diff --git a/compiler/testData/codegen/box/jdk/streamBackwardCompatibility.kt b/compiler/testData/codegen/box/jdk/streamBackwardCompatibility.kt index 8ddf9c02aff..5156b75eded 100644 --- a/compiler/testData/codegen/box/jdk/streamBackwardCompatibility.kt +++ b/compiler/testData/codegen/box/jdk/streamBackwardCompatibility.kt @@ -1,8 +1,9 @@ +// !LANGUAGE: -AdditionalBuiltInsMembers // SKIP_JDK6 // TARGET_BACKEND: JVM -// LANGUAGE_VERSION: 1.0 // WITH_RUNTIME // FULL_JDK + class A(val x: List) : List by x fun box(): String { diff --git a/compiler/testData/codegen/box/jvmPackageName/rootPackage.kt b/compiler/testData/codegen/box/jvmPackageName/rootPackage.kt index ad450a83ce6..5bbb82d7b09 100644 --- a/compiler/testData/codegen/box/jvmPackageName/rootPackage.kt +++ b/compiler/testData/codegen/box/jvmPackageName/rootPackage.kt @@ -1,7 +1,6 @@ // IGNORE_BACKEND: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME -// LANGUAGE_VERSION: 1.2 // FILE: foo.kt diff --git a/compiler/testData/codegen/box/jvmPackageName/simple.kt b/compiler/testData/codegen/box/jvmPackageName/simple.kt index 12038c35d24..334c99eed27 100644 --- a/compiler/testData/codegen/box/jvmPackageName/simple.kt +++ b/compiler/testData/codegen/box/jvmPackageName/simple.kt @@ -1,7 +1,6 @@ // IGNORE_BACKEND: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME -// LANGUAGE_VERSION: 1.2 // FILE: foo.kt diff --git a/compiler/testData/codegen/box/jvmPackageName/withJvmName.kt b/compiler/testData/codegen/box/jvmPackageName/withJvmName.kt index 9e50592f4da..5a6e39ffc37 100644 --- a/compiler/testData/codegen/box/jvmPackageName/withJvmName.kt +++ b/compiler/testData/codegen/box/jvmPackageName/withJvmName.kt @@ -1,7 +1,6 @@ // IGNORE_BACKEND: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME -// LANGUAGE_VERSION: 1.2 // FILE: foo.kt diff --git a/compiler/testData/codegen/box/objects/companionObjectAccess/kt27117_lv12.kt b/compiler/testData/codegen/box/objects/companionObjectAccess/kt27117_lv12.kt index c1afb9f74ba..905f5289624 100644 --- a/compiler/testData/codegen/box/objects/companionObjectAccess/kt27117_lv12.kt +++ b/compiler/testData/codegen/box/objects/companionObjectAccess/kt27117_lv12.kt @@ -1,4 +1,4 @@ -// LANGUAGE_VERSION: 1.2 +// !LANGUAGE: -ProperVisibilityForCompanionObjectInstanceField inline fun on(body: () -> Any) = body().toString() @@ -13,4 +13,4 @@ class A { } -fun box() = A().test() \ No newline at end of file +fun box() = A().test() diff --git a/compiler/testData/codegen/box/objects/companionObjectAccess/kt27117_lv13.kt b/compiler/testData/codegen/box/objects/companionObjectAccess/kt27117_lv13.kt index eb6e7749b54..4298dab2761 100644 --- a/compiler/testData/codegen/box/objects/companionObjectAccess/kt27117_lv13.kt +++ b/compiler/testData/codegen/box/objects/companionObjectAccess/kt27117_lv13.kt @@ -1,5 +1,3 @@ -// LANGUAGE_VERSION: 1.3 - inline fun on(body: () -> Any) = body().toString() class A { @@ -13,4 +11,4 @@ class A { } -fun box() = A().test() \ No newline at end of file +fun box() = A().test() diff --git a/compiler/testData/codegen/box/objects/companionObjectAccess/kt27121_lv12.kt b/compiler/testData/codegen/box/objects/companionObjectAccess/kt27121_lv12.kt index cf7a7c90756..cb4d99b5ff0 100644 --- a/compiler/testData/codegen/box/objects/companionObjectAccess/kt27121_lv12.kt +++ b/compiler/testData/codegen/box/objects/companionObjectAccess/kt27121_lv12.kt @@ -1,4 +1,4 @@ -// LANGUAGE_VERSION: 1.2 +// !LANGUAGE: -ProperVisibilityForCompanionObjectInstanceField interface A { fun test() = ok() diff --git a/compiler/testData/codegen/box/objects/companionObjectAccess/kt27121_lv13.kt b/compiler/testData/codegen/box/objects/companionObjectAccess/kt27121_lv13.kt index d0099a3cbf1..36e79e7b819 100644 --- a/compiler/testData/codegen/box/objects/companionObjectAccess/kt27121_lv13.kt +++ b/compiler/testData/codegen/box/objects/companionObjectAccess/kt27121_lv13.kt @@ -1,5 +1,3 @@ -// LANGUAGE_VERSION: 1.3 - interface A { fun test() = ok() diff --git a/compiler/testData/codegen/box/operatorConventions/percentAsModOnBigIntegerWithoutRem.kt b/compiler/testData/codegen/box/operatorConventions/percentAsModOnBigIntegerWithoutRem.kt index 0d1cdd857dc..5ee8a146904 100644 --- a/compiler/testData/codegen/box/operatorConventions/percentAsModOnBigIntegerWithoutRem.kt +++ b/compiler/testData/codegen/box/operatorConventions/percentAsModOnBigIntegerWithoutRem.kt @@ -1,6 +1,6 @@ +// !LANGUAGE: -ProhibitOperatorMod +// !API_VERSION: 1.0 // TARGET_BACKEND: JVM - -// LANGUAGE_VERSION: 1.0 // FULL_JDK import java.math.BigInteger @@ -8,4 +8,4 @@ import java.math.BigInteger fun box(): String { val m = BigInteger.valueOf(-2) % BigInteger.valueOf(3) return if (m != BigInteger.valueOf(1)) "Fail: BigInteger(-2) mod BigInteger(3) == $m" else "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/platformTypes/primitives/equalsNull_lv12.kt b/compiler/testData/codegen/box/platformTypes/primitives/equalsNull_lv12.kt index 2d8ad0a2143..23bf561c1f9 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/equalsNull_lv12.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/equalsNull_lv12.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// LANGUAGE_VERSION: 1.2 // TARGET_BACKEND: JVM // WITH_RUNTIME // FILE: test.kt @@ -37,4 +36,4 @@ public class J { public static Long LONG_NULL = null; public static Float FLOAT_NULL = null; public static Double DOUBLE_NULL = null; -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/platformTypes/primitives/equalsNull_withExplicitFlag.kt b/compiler/testData/codegen/box/platformTypes/primitives/equalsNull_withExplicitFlag.kt index 9af5339d3a7..ffc15cbfdd3 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/equalsNull_withExplicitFlag.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/equalsNull_withExplicitFlag.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// LANGUAGE_VERSION: 1.2 // KOTLIN_CONFIGURATION_FLAGS: +JVM.NO_EXCEPTION_ON_EXPLICIT_EQUALS_FOR_BOXED_NULL // TARGET_BACKEND: JVM // WITH_RUNTIME @@ -38,4 +37,4 @@ public class J { public static Long LONG_NULL = null; public static Float FLOAT_NULL = null; public static Double DOUBLE_NULL = null; -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/innerSubclass.kt b/compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/innerSubclass.kt index ae96f730eab..63c15894b45 100644 --- a/compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/innerSubclass.kt +++ b/compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/innerSubclass.kt @@ -1,4 +1,3 @@ -// LANGUAGE_VERSION: 1.2 // WITH_RUNTIME open class Foo { diff --git a/compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/sideEffects.kt b/compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/sideEffects.kt index 9d26681fc3b..56b494e09e4 100644 --- a/compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/sideEffects.kt +++ b/compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/sideEffects.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JVM_IR -// LANGUAGE_VERSION: 1.2 // WITH_RUNTIME class Foo { diff --git a/compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/simpleIsInitialized.kt b/compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/simpleIsInitialized.kt index a91306584e4..c07d74426b0 100644 --- a/compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/simpleIsInitialized.kt +++ b/compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/simpleIsInitialized.kt @@ -1,5 +1,4 @@ // TARGET_BACKEND: JVM -// LANGUAGE_VERSION: 1.2 // WITH_RUNTIME // FILE: J.java diff --git a/compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/topLevelProperty.kt b/compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/topLevelProperty.kt index ef928e74a5b..ee30fb69660 100644 --- a/compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/topLevelProperty.kt +++ b/compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/topLevelProperty.kt @@ -1,4 +1,3 @@ -// LANGUAGE_VERSION: 1.2 // WITH_RUNTIME lateinit var bar: String diff --git a/compiler/testData/codegen/box/properties/lateinit/local/capturedLocalLateinit.kt b/compiler/testData/codegen/box/properties/lateinit/local/capturedLocalLateinit.kt index 03507ac8f5a..e36155dfdb7 100644 --- a/compiler/testData/codegen/box/properties/lateinit/local/capturedLocalLateinit.kt +++ b/compiler/testData/codegen/box/properties/lateinit/local/capturedLocalLateinit.kt @@ -1,5 +1,3 @@ -// LANGUAGE_VERSION: 1.2 - fun runNoInline(f: () -> Unit) = f() fun box(): String { @@ -8,4 +6,4 @@ fun box(): String { ok = "OK" } return ok -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/properties/lateinit/local/localLateinit.kt b/compiler/testData/codegen/box/properties/lateinit/local/localLateinit.kt index bb68d6f3f3e..619cd6d90de 100644 --- a/compiler/testData/codegen/box/properties/lateinit/local/localLateinit.kt +++ b/compiler/testData/codegen/box/properties/lateinit/local/localLateinit.kt @@ -1,9 +1,7 @@ -// LANGUAGE_VERSION: 1.2 - fun box(): String { lateinit var ok: String run { ok = "OK" } return ok -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedMemberAccess.kt b/compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedMemberAccess.kt index 2ec43b51f18..8735a8ec7e2 100644 --- a/compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedMemberAccess.kt +++ b/compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedMemberAccess.kt @@ -1,4 +1,3 @@ -// LANGUAGE_VERSION: 1.2 // WITH_RUNTIME import kotlin.UninitializedPropertyAccessException @@ -20,4 +19,4 @@ fun box(): String { catch (e: Throwable) { return "Unexpected exception: ${e::class}" } -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedRead.kt b/compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedRead.kt index 1e66de74e9c..fed7824d7d5 100644 --- a/compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedRead.kt +++ b/compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedRead.kt @@ -1,4 +1,3 @@ -// LANGUAGE_VERSION: 1.2 // WITH_RUNTIME import kotlin.UninitializedPropertyAccessException @@ -20,4 +19,4 @@ fun box(): String { catch (e: Throwable) { return "Unexpected exception: ${e::class}" } -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/properties/lateinit/local/uninitializedMemberAccess.kt b/compiler/testData/codegen/box/properties/lateinit/local/uninitializedMemberAccess.kt index bb44b6b553e..d3d8acc31e5 100644 --- a/compiler/testData/codegen/box/properties/lateinit/local/uninitializedMemberAccess.kt +++ b/compiler/testData/codegen/box/properties/lateinit/local/uninitializedMemberAccess.kt @@ -1,4 +1,3 @@ -// LANGUAGE_VERSION: 1.2 // WITH_RUNTIME import kotlin.UninitializedPropertyAccessException @@ -16,4 +15,4 @@ fun box(): String { catch (e: Throwable) { return "Unexpected exception: ${e::class}" } -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/properties/lateinit/local/uninitializedRead.kt b/compiler/testData/codegen/box/properties/lateinit/local/uninitializedRead.kt index c27563bdf75..9a58e3280b3 100644 --- a/compiler/testData/codegen/box/properties/lateinit/local/uninitializedRead.kt +++ b/compiler/testData/codegen/box/properties/lateinit/local/uninitializedRead.kt @@ -1,4 +1,3 @@ -// LANGUAGE_VERSION: 1.2 // WITH_RUNTIME import kotlin.UninitializedPropertyAccessException @@ -16,4 +15,4 @@ fun box(): String { catch (e: Throwable) { return "Unexpected exception: ${e::class}" } -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/properties/lateinit/topLevel/accessorException.kt b/compiler/testData/codegen/box/properties/lateinit/topLevel/accessorException.kt index a6ecf9ab272..16bc04a0a8b 100644 --- a/compiler/testData/codegen/box/properties/lateinit/topLevel/accessorException.kt +++ b/compiler/testData/codegen/box/properties/lateinit/topLevel/accessorException.kt @@ -1,4 +1,3 @@ -// LANGUAGE_VERSION: 1.2 // WITH_RUNTIME // FILE: lateinit.kt private lateinit var s: String @@ -24,4 +23,4 @@ fun box(): String { return "Unexpected exception: ${e::class}" } -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/properties/lateinit/topLevel/accessorForTopLevelLateinit.kt b/compiler/testData/codegen/box/properties/lateinit/topLevel/accessorForTopLevelLateinit.kt index aca5474f004..caa3418f5b5 100644 --- a/compiler/testData/codegen/box/properties/lateinit/topLevel/accessorForTopLevelLateinit.kt +++ b/compiler/testData/codegen/box/properties/lateinit/topLevel/accessorForTopLevelLateinit.kt @@ -1,5 +1,3 @@ -// LANGUAGE_VERSION: 1.2 - // FILE: lateinit.kt private lateinit var s: String @@ -12,4 +10,4 @@ object C { fun box(): String { C.setS("OK") return C.getS() -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/properties/lateinit/topLevel/topLevelLateinit.kt b/compiler/testData/codegen/box/properties/lateinit/topLevel/topLevelLateinit.kt index 2eb9c779585..23d1104aeba 100644 --- a/compiler/testData/codegen/box/properties/lateinit/topLevel/topLevelLateinit.kt +++ b/compiler/testData/codegen/box/properties/lateinit/topLevel/topLevelLateinit.kt @@ -1,5 +1,3 @@ -// LANGUAGE_VERSION: 1.2 - lateinit var ok: String fun box(): String { @@ -7,4 +5,4 @@ fun box(): String { ok = "OK" } return ok -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedMemberAccess.kt b/compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedMemberAccess.kt index 0c496b9005b..ac24a14335f 100644 --- a/compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedMemberAccess.kt +++ b/compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedMemberAccess.kt @@ -1,4 +1,3 @@ -// LANGUAGE_VERSION: 1.2 // WITH_RUNTIME import kotlin.UninitializedPropertyAccessException @@ -17,4 +16,4 @@ fun box(): String { catch (e: Throwable) { return "Unexpected exception: ${e::class}" } -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedRead.kt b/compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedRead.kt index bc4af80a0c4..9cc162d805c 100644 --- a/compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedRead.kt +++ b/compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedRead.kt @@ -1,4 +1,3 @@ -// LANGUAGE_VERSION: 1.2 // WITH_RUNTIME import kotlin.UninitializedPropertyAccessException @@ -17,4 +16,4 @@ fun box(): String { catch (e: Throwable) { return "Unexpected exception: ${e::class}" } -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/reified/expectedTypeFromCast.kt b/compiler/testData/codegen/box/reified/expectedTypeFromCast.kt index be7bc773033..6b5eb6bbe8f 100644 --- a/compiler/testData/codegen/box/reified/expectedTypeFromCast.kt +++ b/compiler/testData/codegen/box/reified/expectedTypeFromCast.kt @@ -1,8 +1,7 @@ // IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JS, NATIVE - -// LANGUAGE_VERSION: 1.2 // WITH_RUNTIME + import kotlin.test.assertEquals inline fun foo(): T { diff --git a/compiler/testData/codegen/box/vararg/assigningArrayToVarargInAnnotation.kt b/compiler/testData/codegen/box/vararg/assigningArrayToVarargInAnnotation.kt index 20ad291bbc0..37773711807 100644 --- a/compiler/testData/codegen/box/vararg/assigningArrayToVarargInAnnotation.kt +++ b/compiler/testData/codegen/box/vararg/assigningArrayToVarargInAnnotation.kt @@ -1,6 +1,5 @@ // IGNORE_BACKEND: JVM_IR // IGNORE_BACKEND: JS_IR -// LANGUAGE_VERSION: 1.2 // WITH_REFLECT // IGNORE_BACKEND: JS @@ -67,4 +66,4 @@ fun box(): String { } return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCall.kt b/compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCall.kt index 33ee60b46fa..d8269476cb0 100644 --- a/compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCall.kt +++ b/compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCall.kt @@ -1,5 +1,3 @@ -// IGNORE_BACKEND: JVM_IR -// LANGUAGE_VERSION: 1.1 // FILE: JavaClass.java public class JavaClass { @@ -12,10 +10,6 @@ public class JavaClass { return 0.0; } - public Double null0(){ - return null; - } - } @@ -24,10 +18,9 @@ public class JavaClass { fun box(): String { 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" } diff --git a/compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCallNull.kt b/compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCallNull.kt new file mode 100644 index 00000000000..a52b6c80b38 --- /dev/null +++ b/compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCallNull.kt @@ -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" +} + diff --git a/compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCall_lv12.kt b/compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCall_lv12.kt deleted file mode 100644 index 8bbe4d345fe..00000000000 --- a/compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCall_lv12.kt +++ /dev/null @@ -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" -} - diff --git a/compiler/testData/codegen/bytecodeListing/companionObjectVisibility_lv13.kt b/compiler/testData/codegen/bytecodeListing/companionObjectVisibility_lv13.kt index 53c103c3f9d..a350bb47e98 100644 --- a/compiler/testData/codegen/bytecodeListing/companionObjectVisibility_lv13.kt +++ b/compiler/testData/codegen/bytecodeListing/companionObjectVisibility_lv13.kt @@ -1,5 +1,3 @@ -// LANGUAGE_VERSION: 1.3 - open class TestProtectedCompanionInClass { protected companion object } @@ -14,4 +12,4 @@ class TestPrivateCompanionInClass { interface TestPrivateCompanionInInterface { private companion object -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/bytecodeListing/invisibleCompanionObject.kt b/compiler/testData/codegen/bytecodeListing/invisibleCompanionObject.kt deleted file mode 100644 index 7787540026c..00000000000 --- a/compiler/testData/codegen/bytecodeListing/invisibleCompanionObject.kt +++ /dev/null @@ -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 -} \ No newline at end of file diff --git a/compiler/testData/codegen/bytecodeListing/invisibleCompanionObject.txt b/compiler/testData/codegen/bytecodeListing/invisibleCompanionObject.txt deleted file mode 100644 index b7ec6a88374..00000000000 --- a/compiler/testData/codegen/bytecodeListing/invisibleCompanionObject.txt +++ /dev/null @@ -1,44 +0,0 @@ -@kotlin.Metadata -public final class TestInternalCompanion$Test { - inner class TestInternalCompanion$Test - private method (): void - public synthetic method (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 (): void - public method (): void -} - -@kotlin.Metadata -final class TestPrivateCompanion$Test { - inner class TestPrivateCompanion$Test - private method (): void - public synthetic method (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 (): void - public method (): void -} - -@kotlin.Metadata -public final class TestProtectedCompanion$Test { - inner class TestProtectedCompanion$Test - private method (): void - public synthetic method (p0: kotlin.jvm.internal.DefaultConstructorMarker): void -} - -@kotlin.Metadata -public class TestProtectedCompanion { - protected final static field Test: TestProtectedCompanion$Test - inner class TestProtectedCompanion$Test - static method (): void - public method (): void -} diff --git a/compiler/testData/codegen/bytecodeListing/invisibleCompanionObject_lv11.kt b/compiler/testData/codegen/bytecodeListing/invisibleCompanionObject_lv11.kt deleted file mode 100644 index 5333a76ceec..00000000000 --- a/compiler/testData/codegen/bytecodeListing/invisibleCompanionObject_lv11.kt +++ /dev/null @@ -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 -} \ No newline at end of file diff --git a/compiler/testData/codegen/bytecodeListing/invisibleCompanionObject_lv11.txt b/compiler/testData/codegen/bytecodeListing/invisibleCompanionObject_lv11.txt deleted file mode 100644 index 3558ed77657..00000000000 --- a/compiler/testData/codegen/bytecodeListing/invisibleCompanionObject_lv11.txt +++ /dev/null @@ -1,44 +0,0 @@ -@kotlin.Metadata -public final class TestInternalCompanion$Test { - inner class TestInternalCompanion$Test - private method (): void - public synthetic method (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 (): void - public method (): void -} - -@kotlin.Metadata -final class TestPrivateCompanion$Test { - inner class TestPrivateCompanion$Test - private method (): void - public synthetic method (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 (): void - public method (): void -} - -@kotlin.Metadata -public final class TestProtectedCompanion$Test { - inner class TestProtectedCompanion$Test - private method (): void - public synthetic method (p0: kotlin.jvm.internal.DefaultConstructorMarker): void -} - -@kotlin.Metadata -public class TestProtectedCompanion { - public final static field Test: TestProtectedCompanion$Test - inner class TestProtectedCompanion$Test - static method (): void - public method (): void -} diff --git a/compiler/testData/codegen/bytecodeListing/invisibleCompanionObject_lv12.kt b/compiler/testData/codegen/bytecodeListing/invisibleCompanionObject_lv12.kt deleted file mode 100644 index 3f11dd6987c..00000000000 --- a/compiler/testData/codegen/bytecodeListing/invisibleCompanionObject_lv12.kt +++ /dev/null @@ -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 -} \ No newline at end of file diff --git a/compiler/testData/codegen/bytecodeListing/invisibleCompanionObject_lv12.txt b/compiler/testData/codegen/bytecodeListing/invisibleCompanionObject_lv12.txt deleted file mode 100644 index e2b445a099c..00000000000 --- a/compiler/testData/codegen/bytecodeListing/invisibleCompanionObject_lv12.txt +++ /dev/null @@ -1,44 +0,0 @@ -@kotlin.Metadata -public final class TestInternalCompanion$Test { - inner class TestInternalCompanion$Test - private method (): void - public synthetic method (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 (): void - public method (): void -} - -@kotlin.Metadata -final class TestPrivateCompanion$Test { - inner class TestPrivateCompanion$Test - private method (): void - public synthetic method (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 (): void - public method (): void -} - -@kotlin.Metadata -public final class TestProtectedCompanion$Test { - inner class TestProtectedCompanion$Test - private method (): void - public synthetic method (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 (): void - public method (): void -} diff --git a/compiler/testData/codegen/bytecodeText/constProperty/accessorsForPrivateConstants.kt b/compiler/testData/codegen/bytecodeText/constProperty/accessorsForPrivateConstants.kt index d2c893eede3..df44cb7e53c 100644 --- a/compiler/testData/codegen/bytecodeText/constProperty/accessorsForPrivateConstants.kt +++ b/compiler/testData/codegen/bytecodeText/constProperty/accessorsForPrivateConstants.kt @@ -1,4 +1,4 @@ -// LANGUAGE_VERSION: 1.0 +// !LANGUAGE: -InlineConstVals // FILE: Foo.kt private const val OUTER_PRIVATE = 20 @@ -18,4 +18,4 @@ class Foo { // 1 INVOKESTATIC // 1 PUTSTATIC -// 2 GETSTATIC \ No newline at end of file +// 2 GETSTATIC diff --git a/compiler/testData/codegen/bytecodeText/constProperty/noInline.kt b/compiler/testData/codegen/bytecodeText/constProperty/noInline.kt index b0dd52b1fd5..08f5f827381 100644 --- a/compiler/testData/codegen/bytecodeText/constProperty/noInline.kt +++ b/compiler/testData/codegen/bytecodeText/constProperty/noInline.kt @@ -1,4 +1,4 @@ -// LANGUAGE_VERSION: 1.0 +// !LANGUAGE: -InlineConstVals const val z = 0 @@ -6,4 +6,4 @@ fun a() { val x = z } -// 1 GETSTATIC NoInlineKt.z : I \ No newline at end of file +// 1 GETSTATIC NoInlineKt.z : I diff --git a/compiler/testData/codegen/bytecodeText/constProperty/noInlineInCmp.kt b/compiler/testData/codegen/bytecodeText/constProperty/noInlineInCmp.kt index a85f9168d7c..39d32f49641 100644 --- a/compiler/testData/codegen/bytecodeText/constProperty/noInlineInCmp.kt +++ b/compiler/testData/codegen/bytecodeText/constProperty/noInlineInCmp.kt @@ -1,4 +1,4 @@ -// LANGUAGE_VERSION: 1.0 +// !LANGUAGE: -InlineConstVals const val z = 0 @@ -7,4 +7,4 @@ fun a() { } } -// 1 GETSTATIC NoInlineInCmpKt.z : I \ No newline at end of file +// 1 GETSTATIC NoInlineInCmpKt.z : I diff --git a/compiler/testData/codegen/bytecodeText/constants/noInlineNonStaticJavaField_lv10.kt b/compiler/testData/codegen/bytecodeText/constants/noInlineNonStaticJavaField_lv10.kt index 6df005840c8..78578e56c0e 100644 --- a/compiler/testData/codegen/bytecodeText/constants/noInlineNonStaticJavaField_lv10.kt +++ b/compiler/testData/codegen/bytecodeText/constants/noInlineNonStaticJavaField_lv10.kt @@ -1,4 +1,4 @@ -// LANGUAGE_VERSION: 1.0 +// !LANGUAGE: -InlineConstVals // FILE: test.kt fun test1(a: A) = a.X fun test2(a: A) = 1 + a.X @@ -12,4 +12,4 @@ public class A { // @TestKt.class: // 0 42 // 0 43 -// 3 GETFIELD A.X \ No newline at end of file +// 3 GETFIELD A.X diff --git a/compiler/testData/codegen/bytecodeText/constants/noInlineNonStaticJavaField_lv11.kt b/compiler/testData/codegen/bytecodeText/constants/noInlineNonStaticJavaField_lv11.kt deleted file mode 100644 index b423253b1d7..00000000000 --- a/compiler/testData/codegen/bytecodeText/constants/noInlineNonStaticJavaField_lv11.kt +++ /dev/null @@ -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 \ No newline at end of file diff --git a/compiler/testData/codegen/bytecodeText/lazyCodegen/negateConstantCompare.kt b/compiler/testData/codegen/bytecodeText/lazyCodegen/negateConstantCompare.kt index 111a2828caf..f52ff9efb75 100644 --- a/compiler/testData/codegen/bytecodeText/lazyCodegen/negateConstantCompare.kt +++ b/compiler/testData/codegen/bytecodeText/lazyCodegen/negateConstantCompare.kt @@ -1,4 +1,4 @@ -// LANGUAGE_VERSION: 1.0 +// !LANGUAGE: -InlineConstVals const val one = 1 const val two = 2 @@ -8,4 +8,5 @@ fun test1() { val p = 1 } } -// 1 IF \ No newline at end of file + +// 1 IF diff --git a/compiler/testData/codegen/bytecodeText/noInlineJavaProtectedConstants.kt b/compiler/testData/codegen/bytecodeText/noInlineJavaProtectedConstants.kt index 3fd47c381e1..ad6429c866a 100644 --- a/compiler/testData/codegen/bytecodeText/noInlineJavaProtectedConstants.kt +++ b/compiler/testData/codegen/bytecodeText/noInlineJavaProtectedConstants.kt @@ -1,4 +1,4 @@ -// LANGUAGE_VERSION: 1.0 +// !LANGUAGE: -InlineConstVals // FILE: first/Foo.java package first; @@ -20,4 +20,4 @@ class Bar : Foo() { // @second/BarKt.class // 1 INVOKESTATIC // 0 GETSTATIC -// 1 BIPUSH 42 \ No newline at end of file +// 1 BIPUSH 42 diff --git a/compiler/testData/codegen/bytecodeText/nullCheckOptimization/localLateinit/checkedAlways.kt b/compiler/testData/codegen/bytecodeText/nullCheckOptimization/localLateinit/checkedAlways.kt index 88443d62551..275536e616b 100644 --- a/compiler/testData/codegen/bytecodeText/nullCheckOptimization/localLateinit/checkedAlways.kt +++ b/compiler/testData/codegen/bytecodeText/nullCheckOptimization/localLateinit/checkedAlways.kt @@ -1,5 +1,3 @@ -// LANGUAGE_VERSION: 1.2 - fun almostAlwaysTrue() = true fun runNoInline(f: () -> Unit) = f() @@ -23,4 +21,4 @@ fun test() { // 0 IFNULL // 3 IFNONNULL -// 3 throwUninitializedPropertyAccessException \ No newline at end of file +// 3 throwUninitializedPropertyAccessException diff --git a/compiler/testData/codegen/bytecodeText/nullCheckOptimization/localLateinit/checkedOnce.kt b/compiler/testData/codegen/bytecodeText/nullCheckOptimization/localLateinit/checkedOnce.kt index 16c51ed3789..385f2a0ebba 100644 --- a/compiler/testData/codegen/bytecodeText/nullCheckOptimization/localLateinit/checkedOnce.kt +++ b/compiler/testData/codegen/bytecodeText/nullCheckOptimization/localLateinit/checkedOnce.kt @@ -1,5 +1,3 @@ -// LANGUAGE_VERSION: 1.2 - fun almostAlwaysTrue() = true fun test() { @@ -16,4 +14,4 @@ fun test() { // 0 IFNULL // 1 IFNONNULL -// 1 throwUninitializedPropertyAccessException \ No newline at end of file +// 1 throwUninitializedPropertyAccessException diff --git a/compiler/testData/codegen/bytecodeText/nullCheckOptimization/localLateinit/initialized.kt b/compiler/testData/codegen/bytecodeText/nullCheckOptimization/localLateinit/initialized.kt index b65458ff3bb..b73f0d43670 100644 --- a/compiler/testData/codegen/bytecodeText/nullCheckOptimization/localLateinit/initialized.kt +++ b/compiler/testData/codegen/bytecodeText/nullCheckOptimization/localLateinit/initialized.kt @@ -1,5 +1,3 @@ -// LANGUAGE_VERSION: 1.2 - fun test() { lateinit var z: String run { @@ -9,4 +7,4 @@ fun test() { } // 0 IFNULL -// 0 IFNONNULL \ No newline at end of file +// 0 IFNONNULL diff --git a/compiler/testData/codegen/bytecodeText/whenStringOptimization/nonInlinedConst.kt b/compiler/testData/codegen/bytecodeText/whenStringOptimization/nonInlinedConst.kt index c478c9219ec..e44503c1d45 100644 --- a/compiler/testData/codegen/bytecodeText/whenStringOptimization/nonInlinedConst.kt +++ b/compiler/testData/codegen/bytecodeText/whenStringOptimization/nonInlinedConst.kt @@ -1,4 +1,4 @@ -// LANGUAGE_VERSION: 1.0 +// !LANGUAGE: -InlineConstVals const val y = "cde" diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvmPackageName.kt b/compiler/testData/compileKotlinAgainstKotlin/jvmPackageName.kt index 8a351766474..1aa015ab599 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvmPackageName.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/jvmPackageName.kt @@ -1,6 +1,5 @@ // IGNORE_BACKEND: NATIVE // FILE: A.kt -// LANGUAGE_VERSION: 1.2 @file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") @file:JvmPackageName("bar") @@ -13,7 +12,6 @@ var v: Int = 1 inline fun i(block: () -> Unit) = block() // FILE: B.kt -// LANGUAGE_VERSION: 1.2 import foo.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameInRootPackage.kt b/compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameInRootPackage.kt index 65d9f3365ab..b1652985189 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameInRootPackage.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameInRootPackage.kt @@ -1,6 +1,5 @@ // IGNORE_BACKEND: NATIVE // FILE: A.kt -// LANGUAGE_VERSION: 1.2 @file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") @file:JvmPackageName("bar") @@ -10,7 +9,6 @@ fun f() = "OK" var v: Int = 1 // FILE: B.kt -// LANGUAGE_VERSION: 1.2 fun box(): String { v = 2 diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameWithJvmName.kt b/compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameWithJvmName.kt index d5aa6ce0906..22284c18369 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameWithJvmName.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameWithJvmName.kt @@ -1,6 +1,5 @@ // IGNORE_BACKEND: NATIVE // FILE: A.kt -// LANGUAGE_VERSION: 1.2 @file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") @file:JvmPackageName("bar") @@ -12,7 +11,6 @@ fun f() = "OK" var v: Int = 1 // FILE: B.kt -// LANGUAGE_VERSION: 1.2 import foo.* diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxAgainstJavaCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxAgainstJavaCodegenTestGenerated.java index 8045de94ff9..112edff0b9d 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxAgainstJavaCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxAgainstJavaCodegenTestGenerated.java @@ -322,9 +322,9 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxAga runTest("compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCall.kt"); } - @TestMetadata("explicitEqualsCall_lv12.kt") - public void testExplicitEqualsCall_lv12() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCall_lv12.kt"); + @TestMetadata("explicitEqualsCallNull.kt") + public void testExplicitEqualsCallNull() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCallNull.kt"); } @TestMetadata("float.kt") diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java index e532dd2bd8a..b82a29af9e6 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java @@ -108,21 +108,6 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest { 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") public void testJvmOverloadsAndParametersAnnotations() throws Exception { runTest("compiler/testData/codegen/bytecodeListing/jvmOverloadsAndParametersAnnotations.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java index 81a9166153f..0c92f434b1d 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java @@ -1030,11 +1030,6 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { 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") public void testNullableByteAndShort() throws Exception { runTest("compiler/testData/codegen/bytecodeText/constants/nullableByteAndShort.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxAgainstJavaCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxAgainstJavaCodegenTestGenerated.java index 7a7e1602815..9c65bf6c2f8 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxAgainstJavaCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxAgainstJavaCodegenTestGenerated.java @@ -322,9 +322,9 @@ public class IrBlackBoxAgainstJavaCodegenTestGenerated extends AbstractIrBlackBo runTest("compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCall.kt"); } - @TestMetadata("explicitEqualsCall_lv12.kt") - public void testExplicitEqualsCall_lv12() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCall_lv12.kt"); + @TestMetadata("explicitEqualsCallNull.kt") + public void testExplicitEqualsCallNull() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCallNull.kt"); } @TestMetadata("float.kt")