diff --git a/compiler/testData/cli/jvm/jvmRecordWrongTarget.out b/compiler/testData/cli/jvm/jvmRecordWrongTarget.out index f4989fec672..8e6229c35bd 100644 --- a/compiler/testData/cli/jvm/jvmRecordWrongTarget.out +++ b/compiler/testData/cli/jvm/jvmRecordWrongTarget.out @@ -7,5 +7,6 @@ This mode is not recommended for production use, as no stability/compatibility guarantees are given on compiler or generated code. Use it at your own risk! -error: -XXLanguage:+JvmRecordSupport feature is only supported with JVM target 15_PREVIEW or later +warning: language version 1.5 is experimental, there are no backwards compatibility guarantees for new language and library features +error: -XXLanguage:+JvmRecordSupport feature is only supported with JVM target 15 or later COMPILATION_ERROR diff --git a/compiler/testData/codegen/java15/box/records/bytecodeShapeForJava.kt b/compiler/testData/codegen/java15/box/records/bytecodeShapeForJava.kt index 45ba2eb96b4..4d5ec2b2c74 100644 --- a/compiler/testData/codegen/java15/box/records/bytecodeShapeForJava.kt +++ b/compiler/testData/codegen/java15/box/records/bytecodeShapeForJava.kt @@ -1,3 +1,4 @@ +// !API_VERSION: 1.5 // !LANGUAGE: +JvmRecordSupport // JVM_TARGET: 15_PREVIEW // FILE: JavaClass.java diff --git a/compiler/testData/codegen/java15/box/records/dataJvmRecord.kt b/compiler/testData/codegen/java15/box/records/dataJvmRecord.kt index 5e606378551..e4e227fa580 100644 --- a/compiler/testData/codegen/java15/box/records/dataJvmRecord.kt +++ b/compiler/testData/codegen/java15/box/records/dataJvmRecord.kt @@ -1,3 +1,4 @@ +// !API_VERSION: 1.5 // !LANGUAGE: +JvmRecordSupport // JVM_TARGET: 15_PREVIEW diff --git a/compiler/testData/diagnostics/testsWithJava15/jvmRecord/diagnostics.kt b/compiler/testData/diagnostics/testsWithJava15/jvmRecord/diagnostics.kt index 0f966df7fdf..6e3584e5de5 100644 --- a/compiler/testData/diagnostics/testsWithJava15/jvmRecord/diagnostics.kt +++ b/compiler/testData/diagnostics/testsWithJava15/jvmRecord/diagnostics.kt @@ -1,3 +1,4 @@ +// !API_VERSION: 1.5 // !LANGUAGE: +JvmRecordSupport // SKIP_TXT diff --git a/compiler/testData/diagnostics/testsWithJava15/jvmRecord/disabledFeature.kt b/compiler/testData/diagnostics/testsWithJava15/jvmRecord/disabledFeature.kt index 839708b63d0..c518c1bcecc 100644 --- a/compiler/testData/diagnostics/testsWithJava15/jvmRecord/disabledFeature.kt +++ b/compiler/testData/diagnostics/testsWithJava15/jvmRecord/disabledFeature.kt @@ -1,3 +1,4 @@ +// !API_VERSION: 1.5 // !LANGUAGE: -JvmRecordSupport // SKIP_TXT // FILE: JRecord.java diff --git a/compiler/testData/diagnostics/testsWithJava15/jvmRecord/irrelevantFields.kt b/compiler/testData/diagnostics/testsWithJava15/jvmRecord/irrelevantFields.kt index e7ab68514a0..4055201e76d 100644 --- a/compiler/testData/diagnostics/testsWithJava15/jvmRecord/irrelevantFields.kt +++ b/compiler/testData/diagnostics/testsWithJava15/jvmRecord/irrelevantFields.kt @@ -1,3 +1,4 @@ +// !API_VERSION: 1.5 // !LANGUAGE: +JvmRecordSupport // SKIP_TXT diff --git a/compiler/testData/diagnostics/testsWithJava15/jvmRecord/jvmRecordDescriptorStructure.kt b/compiler/testData/diagnostics/testsWithJava15/jvmRecord/jvmRecordDescriptorStructure.kt index 03f7c4db25d..5d76ab12982 100644 --- a/compiler/testData/diagnostics/testsWithJava15/jvmRecord/jvmRecordDescriptorStructure.kt +++ b/compiler/testData/diagnostics/testsWithJava15/jvmRecord/jvmRecordDescriptorStructure.kt @@ -1,3 +1,4 @@ +// !API_VERSION: 1.5 // !LANGUAGE: +JvmRecordSupport @JvmRecord diff --git a/compiler/testData/diagnostics/testsWithJava15/jvmRecord/simpleRecords.kt b/compiler/testData/diagnostics/testsWithJava15/jvmRecord/simpleRecords.kt index a56a6b3b13e..8d52377b34f 100644 --- a/compiler/testData/diagnostics/testsWithJava15/jvmRecord/simpleRecords.kt +++ b/compiler/testData/diagnostics/testsWithJava15/jvmRecord/simpleRecords.kt @@ -1,3 +1,4 @@ +// !API_VERSION: 1.5 // !LANGUAGE: +JvmRecordSupport // FILE: MyRecord.java public record MyRecord(int x, CharSequence y) { diff --git a/compiler/testData/diagnostics/testsWithJava15/jvmRecord/supertypesCheck.kt b/compiler/testData/diagnostics/testsWithJava15/jvmRecord/supertypesCheck.kt index 1db55f41fe7..6d7a4092a6d 100644 --- a/compiler/testData/diagnostics/testsWithJava15/jvmRecord/supertypesCheck.kt +++ b/compiler/testData/diagnostics/testsWithJava15/jvmRecord/supertypesCheck.kt @@ -1,3 +1,4 @@ +// !API_VERSION: 1.5 // !LANGUAGE: +JvmRecordSupport abstract class Abstract diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmRecordWithoutJdk15.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmRecordWithoutJdk15.fir.kt index a9d577ce323..414fc8fb11a 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmRecordWithoutJdk15.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmRecordWithoutJdk15.fir.kt @@ -1,4 +1,5 @@ // !LANGUAGE: +JvmRecordSupport +// !API_VERSION: 1.5 // SKIP_TXT @JvmRecord diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmRecordWithoutJdk15.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmRecordWithoutJdk15.kt index 8012ef2fdcb..9b419f6224d 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmRecordWithoutJdk15.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmRecordWithoutJdk15.kt @@ -1,4 +1,5 @@ // !LANGUAGE: +JvmRecordSupport +// !API_VERSION: 1.5 // SKIP_TXT @JvmRecord diff --git a/libraries/stdlib/common/src/kotlin/JvmAnnotationsH.kt b/libraries/stdlib/common/src/kotlin/JvmAnnotationsH.kt index 99956bdf2ee..313e185c4f0 100644 --- a/libraries/stdlib/common/src/kotlin/JvmAnnotationsH.kt +++ b/libraries/stdlib/common/src/kotlin/JvmAnnotationsH.kt @@ -119,6 +119,7 @@ public expect annotation class JvmInline() @Target(AnnotationTarget.CLASS) @MustBeDocumented @OptionalExpectation +@SinceKotlin("1.5") public expect annotation class JvmRecord /** @@ -166,4 +167,3 @@ public expect annotation class Synchronized() @SinceKotlin("1.2") @OptionalExpectation internal expect annotation class JvmPackageName(val name: String) - diff --git a/libraries/stdlib/jvm/runtime/kotlin/jvm/annotations/JvmPlatformAnnotations.kt b/libraries/stdlib/jvm/runtime/kotlin/jvm/annotations/JvmPlatformAnnotations.kt index a96202d3ec1..b4840dcf71d 100644 --- a/libraries/stdlib/jvm/runtime/kotlin/jvm/annotations/JvmPlatformAnnotations.kt +++ b/libraries/stdlib/jvm/runtime/kotlin/jvm/annotations/JvmPlatformAnnotations.kt @@ -152,4 +152,5 @@ public actual annotation class JvmInline @Target(AnnotationTarget.CLASS) @Retention(AnnotationRetention.SOURCE) @MustBeDocumented +@SinceKotlin("1.5") public actual annotation class JvmRecord