diff --git a/.idea/libraries/kotlinc_kotlin_dist.xml b/.idea/libraries/kotlinc_kotlin_dist.xml index 3117e5de4ca6..ef3736db0021 100644 --- a/.idea/libraries/kotlinc_kotlin_dist.xml +++ b/.idea/libraries/kotlinc_kotlin_dist.xml @@ -1,18 +1,18 @@ - + - - 620b6b9869be28eec26ba231cf4952929ec4bccc4b7ee93bc3f2934af94cf1ad + + 1b85efa55643f31e348f8388484af2cf3623023c020cb1b6416667f25111e6d2 - + - + \ No newline at end of file diff --git a/.idea/libraries/kotlinc_kotlin_jps_plugin_classpath.xml b/.idea/libraries/kotlinc_kotlin_jps_plugin_classpath.xml index ac01ca9b2079..34022b8e890c 100644 --- a/.idea/libraries/kotlinc_kotlin_jps_plugin_classpath.xml +++ b/.idea/libraries/kotlinc_kotlin_jps_plugin_classpath.xml @@ -1,18 +1,18 @@ - + - - 3f1aa8f4aa89f18be946552fc75b9c62cc00651560bbc1a9e2685c5ddde247a3 + + e3912443ef09b3f930685cf8e9322f28547f0ef3c63b97078c9766306d2dc438 - + - + \ No newline at end of file diff --git a/.idea/libraries/kotlinc_kotlin_jps_plugin_tests.xml b/.idea/libraries/kotlinc_kotlin_jps_plugin_tests.xml index a87300ce75eb..df3214775834 100644 --- a/.idea/libraries/kotlinc_kotlin_jps_plugin_tests.xml +++ b/.idea/libraries/kotlinc_kotlin_jps_plugin_tests.xml @@ -1,18 +1,18 @@ - + - - e30ddef4e4c3d1d21088cf5722befb8745a3da84ef794fc9f998f069b3897881 + + 0e570634d9d6358b6a48dcb47ea626eda4c40245c0e6a1023c7e6ab0b2e0f8ca - + - + \ No newline at end of file diff --git a/plugins/kotlin/completion/testData/keywords/AfterClassProperty.kt b/plugins/kotlin/completion/testData/keywords/AfterClassProperty.kt index 5ded4ab000e8..c79af76a0e5c 100644 --- a/plugins/kotlin/completion/testData/keywords/AfterClassProperty.kt +++ b/plugins/kotlin/completion/testData/keywords/AfterClassProperty.kt @@ -49,4 +49,5 @@ class MouseMovedEventArgs // EXIST: typealias // EXIST: expect // EXIST: actual +// EXIST: data object // NOTHING_ELSE diff --git a/plugins/kotlin/completion/testData/keywords/AfterClasses.kt b/plugins/kotlin/completion/testData/keywords/AfterClasses.kt index d85680fcb31b..e95649502a0a 100644 --- a/plugins/kotlin/completion/testData/keywords/AfterClasses.kt +++ b/plugins/kotlin/completion/testData/keywords/AfterClasses.kt @@ -48,4 +48,5 @@ class AfterClasses { // EXIST: expect // EXIST: actual // EXIST: lateinit var +// EXIST: data object // NOTHING_ELSE diff --git a/plugins/kotlin/completion/testData/keywords/AfterFuns.kt b/plugins/kotlin/completion/testData/keywords/AfterFuns.kt index 4c24ec2f0fef..7f08f8a4b07d 100644 --- a/plugins/kotlin/completion/testData/keywords/AfterFuns.kt +++ b/plugins/kotlin/completion/testData/keywords/AfterFuns.kt @@ -48,4 +48,5 @@ class A { // EXIST: typealias // EXIST: expect // EXIST: actual +// EXIST: data object // NOTHING_ELSE diff --git a/plugins/kotlin/completion/testData/keywords/GlobalPropertyAccessors.kt b/plugins/kotlin/completion/testData/keywords/GlobalPropertyAccessors.kt index ce3fe7ae0326..97c7b4eaaced 100644 --- a/plugins/kotlin/completion/testData/keywords/GlobalPropertyAccessors.kt +++ b/plugins/kotlin/completion/testData/keywords/GlobalPropertyAccessors.kt @@ -57,4 +57,6 @@ var a : Int // EXIST: expect // EXIST: actual // EXIST: lateinit var +// EXIST: data object +// EXIST: { "lookupString":"data object GlobalPropertyAccessors", "itemText":"data object GlobalPropertyAccessors"} // NOTHING_ELSE diff --git a/plugins/kotlin/completion/testData/keywords/InAnnotationClassScope.kt b/plugins/kotlin/completion/testData/keywords/InAnnotationClassScope.kt index 44bc0d442ad3..34d5ff06c429 100644 --- a/plugins/kotlin/completion/testData/keywords/InAnnotationClassScope.kt +++ b/plugins/kotlin/completion/testData/keywords/InAnnotationClassScope.kt @@ -35,4 +35,5 @@ annotation class Test { // EXIST: expect // EXIST: actual // EXIST: companion object +// EXIST: data object // NOTHING_ELSE diff --git a/plugins/kotlin/completion/testData/keywords/InClassBeforeFun.kt b/plugins/kotlin/completion/testData/keywords/InClassBeforeFun.kt index d0a1af7aa2fe..18929b0829cd 100644 --- a/plugins/kotlin/completion/testData/keywords/InClassBeforeFun.kt +++ b/plugins/kotlin/completion/testData/keywords/InClassBeforeFun.kt @@ -46,4 +46,5 @@ public class Test { // EXIST: typealias // EXIST: expect // EXIST: actual +// EXIST: data object // NOTHING_ELSE diff --git a/plugins/kotlin/completion/testData/keywords/InClassScope.kt b/plugins/kotlin/completion/testData/keywords/InClassScope.kt index 69882f992d7b..67ea2c4bb553 100644 --- a/plugins/kotlin/completion/testData/keywords/InClassScope.kt +++ b/plugins/kotlin/completion/testData/keywords/InClassScope.kt @@ -40,4 +40,5 @@ class TestClass { // EXIST: typealias // EXIST: expect // EXIST: actual +// EXIST: data object // NOTHING_ELSE diff --git a/plugins/kotlin/completion/testData/keywords/InEnumScope2.kt b/plugins/kotlin/completion/testData/keywords/InEnumScope2.kt index dc7c734b8a8a..0de996cb746f 100644 --- a/plugins/kotlin/completion/testData/keywords/InEnumScope2.kt +++ b/plugins/kotlin/completion/testData/keywords/InEnumScope2.kt @@ -35,6 +35,7 @@ enum class Test { // EXIST: typealias // EXIST: expect // EXIST: actual +// EXIST: data object /* TODO: items below are not valid here */ // EXIST: class diff --git a/plugins/kotlin/completion/testData/keywords/InInterfaceScope.kt b/plugins/kotlin/completion/testData/keywords/InInterfaceScope.kt index e400ee3f49ac..a2fa5c7373f3 100644 --- a/plugins/kotlin/completion/testData/keywords/InInterfaceScope.kt +++ b/plugins/kotlin/completion/testData/keywords/InInterfaceScope.kt @@ -36,4 +36,5 @@ interface Test { // EXIST: typealias // EXIST: expect // EXIST: actual +// EXIST: data object // NOTHING_ELSE diff --git a/plugins/kotlin/completion/testData/keywords/InObjectScope.kt b/plugins/kotlin/completion/testData/keywords/InObjectScope.kt index 57740f3c5a62..517d2bc987ed 100644 --- a/plugins/kotlin/completion/testData/keywords/InObjectScope.kt +++ b/plugins/kotlin/completion/testData/keywords/InObjectScope.kt @@ -37,4 +37,5 @@ object Test { // EXIST: typealias // EXIST: expect // EXIST: actual +// EXIST: data object // NOTHING_ELSE diff --git a/plugins/kotlin/completion/testData/keywords/PropertyAccessors.kt b/plugins/kotlin/completion/testData/keywords/PropertyAccessors.kt index 980939a19c38..f16a0842482f 100644 --- a/plugins/kotlin/completion/testData/keywords/PropertyAccessors.kt +++ b/plugins/kotlin/completion/testData/keywords/PropertyAccessors.kt @@ -48,4 +48,5 @@ class Some { // EXIST: typealias // EXIST: expect // EXIST: actual +// EXIST: data object // NOTHING_ELSE diff --git a/plugins/kotlin/completion/testData/keywords/PropertyAccessors2.kt b/plugins/kotlin/completion/testData/keywords/PropertyAccessors2.kt index 7991010192de..901d60a829c2 100644 --- a/plugins/kotlin/completion/testData/keywords/PropertyAccessors2.kt +++ b/plugins/kotlin/completion/testData/keywords/PropertyAccessors2.kt @@ -48,4 +48,5 @@ class Some { // EXIST: typealias // EXIST: expect // EXIST: actual +// EXIST: data object // NOTHING_ELSE diff --git a/plugins/kotlin/completion/testData/keywords/PropertySetter.kt b/plugins/kotlin/completion/testData/keywords/PropertySetter.kt index 436107be6f5d..36b5d3e1b7e6 100644 --- a/plugins/kotlin/completion/testData/keywords/PropertySetter.kt +++ b/plugins/kotlin/completion/testData/keywords/PropertySetter.kt @@ -46,4 +46,5 @@ class Some { // EXIST: typealias // EXIST: expect // EXIST: actual +// EXIST: data object // NOTHING_ELSE diff --git a/plugins/kotlin/completion/testData/keywords/TopScope.kt b/plugins/kotlin/completion/testData/keywords/TopScope.kt index 2bc8004fc311..5023c78d8cce 100644 --- a/plugins/kotlin/completion/testData/keywords/TopScope.kt +++ b/plugins/kotlin/completion/testData/keywords/TopScope.kt @@ -43,4 +43,6 @@ // EXIST: expect // EXIST: actual // EXIST: lateinit var +// EXIST: data object +// EXIST: {"lookupString":"data object TopScope", "itemText":"data object TopScope"} // NOTHING_ELSE diff --git a/plugins/kotlin/completion/testData/keywords/TopScope3-.kt b/plugins/kotlin/completion/testData/keywords/TopScope3-.kt index d289de09655d..cb65e03e62c1 100644 --- a/plugins/kotlin/completion/testData/keywords/TopScope3-.kt +++ b/plugins/kotlin/completion/testData/keywords/TopScope3-.kt @@ -35,4 +35,5 @@ // EXIST: expect // EXIST: actual // EXIST: lateinit var +// EXIST: data object // NOTHING_ELSE diff --git a/plugins/kotlin/completion/testData/keywords/topScope2.kt b/plugins/kotlin/completion/testData/keywords/topScope2.kt index d289de09655d..cb65e03e62c1 100644 --- a/plugins/kotlin/completion/testData/keywords/topScope2.kt +++ b/plugins/kotlin/completion/testData/keywords/topScope2.kt @@ -35,4 +35,5 @@ // EXIST: expect // EXIST: actual // EXIST: lateinit var +// EXIST: data object // NOTHING_ELSE diff --git a/plugins/kotlin/completion/testData/weighers/basic/expectedInfo/WhenByEnum.kt b/plugins/kotlin/completion/testData/weighers/basic/expectedInfo/WhenByEnum.kt index df40d98f73cc..714ac3c4f474 100644 --- a/plugins/kotlin/completion/testData/weighers/basic/expectedInfo/WhenByEnum.kt +++ b/plugins/kotlin/completion/testData/weighers/basic/expectedInfo/WhenByEnum.kt @@ -15,5 +15,5 @@ fun foo(e: E) { // ORDER: B // ORDER: C // ORDER: valueOf -// ORDER: values // ORDER: A +// ORDER: values diff --git a/plugins/kotlin/idea/tests/testData/checker/Abstract.kt b/plugins/kotlin/idea/tests/testData/checker/Abstract.kt index a26c1a78b74b..0b2dcea9e5df 100644 --- a/plugins/kotlin/idea/tests/testData/checker/Abstract.kt +++ b/plugins/kotlin/idea/tests/testData/checker/Abstract.kt @@ -1,3 +1,5 @@ +// RUNTIME + package abstract class MyClass() { diff --git a/plugins/kotlin/idea/tests/testData/idea/actions/kotlinAddImportAction/KotlinDurations.kt b/plugins/kotlin/idea/tests/testData/idea/actions/kotlinAddImportAction/KotlinDurations.kt index 290aaecee42a..94830779a7ee 100644 --- a/plugins/kotlin/idea/tests/testData/idea/actions/kotlinAddImportAction/KotlinDurations.kt +++ b/plugins/kotlin/idea/tests/testData/idea/actions/kotlinAddImportAction/KotlinDurations.kt @@ -1,6 +1,5 @@ // WITH_STDLIB // EXPECT_VARIANT_IN_ORDER "public final val kotlin.Int.seconds: kotlin.time.Duration defined in kotlin.time.Duration.Companion" -// EXPECT_VARIANT_IN_ORDER "public val kotlin.Int.seconds: kotlin.time.Duration defined in kotlin.time" package root fun foo() { diff --git a/plugins/kotlin/idea/tests/testData/idea/actions/kotlinAddImportAction/KotlinDurations.kt.after b/plugins/kotlin/idea/tests/testData/idea/actions/kotlinAddImportAction/KotlinDurations.kt.after index 194d95543492..a6f1156373f0 100644 --- a/plugins/kotlin/idea/tests/testData/idea/actions/kotlinAddImportAction/KotlinDurations.kt.after +++ b/plugins/kotlin/idea/tests/testData/idea/actions/kotlinAddImportAction/KotlinDurations.kt.after @@ -1,6 +1,5 @@ // WITH_STDLIB // EXPECT_VARIANT_IN_ORDER "public final val kotlin.Int.seconds: kotlin.time.Duration defined in kotlin.time.Duration.Companion" -// EXPECT_VARIANT_IN_ORDER "public val kotlin.Int.seconds: kotlin.time.Duration defined in kotlin.time" package root import kotlin.time.Duration.Companion.seconds diff --git a/plugins/kotlin/idea/tests/testData/idea/actions/kotlinAddImportAction/KotlinDurations2.kt b/plugins/kotlin/idea/tests/testData/idea/actions/kotlinAddImportAction/KotlinDurations2.kt index 6774ea29fc0e..6d2f11b0a4ea 100644 --- a/plugins/kotlin/idea/tests/testData/idea/actions/kotlinAddImportAction/KotlinDurations2.kt +++ b/plugins/kotlin/idea/tests/testData/idea/actions/kotlinAddImportAction/KotlinDurations2.kt @@ -1,6 +1,5 @@ // WITH_STDLIB // EXPECT_VARIANT_IN_ORDER "public final val kotlin.Int.seconds: kotlin.time.Duration defined in kotlin.time.Duration.Companion" -// EXPECT_VARIANT_IN_ORDER "public val kotlin.Int.seconds: kotlin.time.Duration defined in kotlin.time" package root fun foo(x: Int?) = x.seconds diff --git a/plugins/kotlin/idea/tests/testData/idea/actions/kotlinAddImportAction/KotlinDurations2.kt.after b/plugins/kotlin/idea/tests/testData/idea/actions/kotlinAddImportAction/KotlinDurations2.kt.after index 67b5bd8cf631..d5d5d84ab724 100644 --- a/plugins/kotlin/idea/tests/testData/idea/actions/kotlinAddImportAction/KotlinDurations2.kt.after +++ b/plugins/kotlin/idea/tests/testData/idea/actions/kotlinAddImportAction/KotlinDurations2.kt.after @@ -1,6 +1,5 @@ // WITH_STDLIB // EXPECT_VARIANT_IN_ORDER "public final val kotlin.Int.seconds: kotlin.time.Duration defined in kotlin.time.Duration.Companion" -// EXPECT_VARIANT_IN_ORDER "public val kotlin.Int.seconds: kotlin.time.Duration defined in kotlin.time" package root import kotlin.time.Duration.Companion.seconds diff --git a/plugins/kotlin/idea/tests/testData/inspectionsLocal/convertSealedSubClassToObject/convertSubClassFromAnotherFile.kt.after b/plugins/kotlin/idea/tests/testData/inspectionsLocal/convertSealedSubClassToObject/convertSubClassFromAnotherFile.kt.after index 1fd4644634a5..fec6303693c3 100644 --- a/plugins/kotlin/idea/tests/testData/inspectionsLocal/convertSealedSubClassToObject/convertSubClassFromAnotherFile.kt.after +++ b/plugins/kotlin/idea/tests/testData/inspectionsLocal/convertSealedSubClassToObject/convertSubClassFromAnotherFile.kt.after @@ -1,3 +1,3 @@ // FIX: Convert sealed subclass to object // COMPILER_ARGUMENTS: -XXLanguage:+SealedInterfaces -XXLanguage:+AllowSealedInheritorsInDifferentFilesOfSamePackage -object SubSealed : Sealed() \ No newline at end of file +data object SubSealed : Sealed() \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/inspectionsLocal/convertSealedSubClassToObject/convertSubClassWithModifiers.kt.after b/plugins/kotlin/idea/tests/testData/inspectionsLocal/convertSealedSubClassToObject/convertSubClassWithModifiers.kt.after index 0c4b0204fbad..2a0323cac3ea 100644 --- a/plugins/kotlin/idea/tests/testData/inspectionsLocal/convertSealedSubClassToObject/convertSubClassWithModifiers.kt.after +++ b/plugins/kotlin/idea/tests/testData/inspectionsLocal/convertSealedSubClassToObject/convertSubClassWithModifiers.kt.after @@ -2,4 +2,4 @@ sealed class Sealed -private object SubSealed : Sealed() \ No newline at end of file +private data object SubSealed : Sealed() \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/inspectionsLocal/convertSealedSubClassToObject/convertSubClassWithParentheses.kt.after b/plugins/kotlin/idea/tests/testData/inspectionsLocal/convertSealedSubClassToObject/convertSubClassWithParentheses.kt.after index b7946625cb63..f0689c53ce64 100644 --- a/plugins/kotlin/idea/tests/testData/inspectionsLocal/convertSealedSubClassToObject/convertSubClassWithParentheses.kt.after +++ b/plugins/kotlin/idea/tests/testData/inspectionsLocal/convertSealedSubClassToObject/convertSubClassWithParentheses.kt.after @@ -2,4 +2,4 @@ sealed class Sealed -object SubSealed : Sealed() \ No newline at end of file +data object SubSealed : Sealed() \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/inspectionsLocal/convertSealedSubClassToObject/convertSubClassWithSecondaryConstructor.kt.after b/plugins/kotlin/idea/tests/testData/inspectionsLocal/convertSealedSubClassToObject/convertSubClassWithSecondaryConstructor.kt.after index e8ab407ad32f..7e21a7aa72bc 100644 --- a/plugins/kotlin/idea/tests/testData/inspectionsLocal/convertSealedSubClassToObject/convertSubClassWithSecondaryConstructor.kt.after +++ b/plugins/kotlin/idea/tests/testData/inspectionsLocal/convertSealedSubClassToObject/convertSubClassWithSecondaryConstructor.kt.after @@ -3,7 +3,7 @@ sealed class Sealed -object SubSealed : Sealed() { +data object SubSealed : Sealed() { init { println("init") } diff --git a/plugins/kotlin/idea/tests/testData/inspectionsLocal/convertSealedSubClassToObject/convertSubClassWithoutParentheses.kt.after b/plugins/kotlin/idea/tests/testData/inspectionsLocal/convertSealedSubClassToObject/convertSubClassWithoutParentheses.kt.after index b7946625cb63..f0689c53ce64 100644 --- a/plugins/kotlin/idea/tests/testData/inspectionsLocal/convertSealedSubClassToObject/convertSubClassWithoutParentheses.kt.after +++ b/plugins/kotlin/idea/tests/testData/inspectionsLocal/convertSealedSubClassToObject/convertSubClassWithoutParentheses.kt.after @@ -2,4 +2,4 @@ sealed class Sealed -object SubSealed : Sealed() \ No newline at end of file +data object SubSealed : Sealed() \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/inspectionsLocal/convertSealedSubClassToObject/fakeState.kt.after b/plugins/kotlin/idea/tests/testData/inspectionsLocal/convertSealedSubClassToObject/fakeState.kt.after index 47df5a7086a8..9c0e3fc90b21 100644 --- a/plugins/kotlin/idea/tests/testData/inspectionsLocal/convertSealedSubClassToObject/fakeState.kt.after +++ b/plugins/kotlin/idea/tests/testData/inspectionsLocal/convertSealedSubClassToObject/fakeState.kt.after @@ -12,7 +12,7 @@ sealed class Sealed : Base() { get() = emptyList() } -object Derived : Sealed() { +data object Derived : Sealed() { var length: Int get() = s.length set(value) {} diff --git a/plugins/kotlin/idea/tests/testData/inspectionsLocal/redundantCompanionReference/inEnumEntry3.kt b/plugins/kotlin/idea/tests/testData/inspectionsLocal/redundantCompanionReference/inEnumEntry3.kt index b9c8f2b27fef..8477492c6c6b 100644 --- a/plugins/kotlin/idea/tests/testData/inspectionsLocal/redundantCompanionReference/inEnumEntry3.kt +++ b/plugins/kotlin/idea/tests/testData/inspectionsLocal/redundantCompanionReference/inEnumEntry3.kt @@ -1,3 +1,4 @@ +// ERROR: Companion object of enum class 'E' is uninitialized here enum class E(val value: String) { E1(E.Companion.foo); diff --git a/plugins/kotlin/idea/tests/testData/inspectionsLocal/redundantCompanionReference/inEnumEntry3.kt.after b/plugins/kotlin/idea/tests/testData/inspectionsLocal/redundantCompanionReference/inEnumEntry3.kt.after index 76420bd4bc57..67137a856965 100644 --- a/plugins/kotlin/idea/tests/testData/inspectionsLocal/redundantCompanionReference/inEnumEntry3.kt.after +++ b/plugins/kotlin/idea/tests/testData/inspectionsLocal/redundantCompanionReference/inEnumEntry3.kt.after @@ -1,3 +1,4 @@ +// ERROR: Companion object of enum class 'E' is uninitialized here enum class E(val value: String) { E1(E.foo); diff --git a/plugins/kotlin/idea/tests/testData/inspectionsLocal/redundantOverride/abstractHiddenByFakeOverride.kt b/plugins/kotlin/idea/tests/testData/inspectionsLocal/redundantOverride/abstractHiddenByFakeOverride.kt index 806d4727b8c3..10d83a55a39a 100644 --- a/plugins/kotlin/idea/tests/testData/inspectionsLocal/redundantOverride/abstractHiddenByFakeOverride.kt +++ b/plugins/kotlin/idea/tests/testData/inspectionsLocal/redundantOverride/abstractHiddenByFakeOverride.kt @@ -1,4 +1,5 @@ // PROBLEM: none +// ERROR: Abstract member cannot be accessed directly interface Foo { fun check(): String = "OK" diff --git a/plugins/kotlin/idea/tests/testData/inspectionsLocal/removeRedundantQualifierName/notApplicableCompanionInEnumEntry.kt b/plugins/kotlin/idea/tests/testData/inspectionsLocal/removeRedundantQualifierName/notApplicableCompanionInEnumEntry.kt index 4fdc0e55634a..78ad06d913c0 100644 --- a/plugins/kotlin/idea/tests/testData/inspectionsLocal/removeRedundantQualifierName/notApplicableCompanionInEnumEntry.kt +++ b/plugins/kotlin/idea/tests/testData/inspectionsLocal/removeRedundantQualifierName/notApplicableCompanionInEnumEntry.kt @@ -1,4 +1,5 @@ // PROBLEM: none +// ERROR: Companion object of enum class 'C' is uninitialized here enum class C(val i: Int) { ONE(C.K) ; diff --git a/plugins/kotlin/idea/tests/testData/intentions/convertEnumToSealedClass/entriesAndMembers.kt.after b/plugins/kotlin/idea/tests/testData/intentions/convertEnumToSealedClass/entriesAndMembers.kt.after index 01ce6344b513..cbed2dd32ccc 100644 --- a/plugins/kotlin/idea/tests/testData/intentions/convertEnumToSealedClass/entriesAndMembers.kt.after +++ b/plugins/kotlin/idea/tests/testData/intentions/convertEnumToSealedClass/entriesAndMembers.kt.after @@ -7,9 +7,9 @@ sealed class MyEnum(val s: String = "") { } - object FOO : MyEnum("FOO") - object BAR : MyEnum("BAR") - object DEFAULT : MyEnum() + data object FOO : MyEnum("FOO") + data object BAR : MyEnum("BAR") + data object DEFAULT : MyEnum() companion object { fun values(): Array { return arrayOf(FOO, BAR, DEFAULT) diff --git a/plugins/kotlin/idea/tests/testData/intentions/convertEnumToSealedClass/entriesOnly.kt.after b/plugins/kotlin/idea/tests/testData/intentions/convertEnumToSealedClass/entriesOnly.kt.after index af0be980a017..ebe67350a269 100644 --- a/plugins/kotlin/idea/tests/testData/intentions/convertEnumToSealedClass/entriesOnly.kt.after +++ b/plugins/kotlin/idea/tests/testData/intentions/convertEnumToSealedClass/entriesOnly.kt.after @@ -2,9 +2,9 @@ // AFTER-WARNING: Variable 'n' is never used sealed class MyEnum(val s: String = "") { - object FOO : MyEnum("FOO") - object BAR : MyEnum("BAR") - object DEFAULT : MyEnum() + data object FOO : MyEnum("FOO") + data object BAR : MyEnum("BAR") + data object DEFAULT : MyEnum() companion object { fun values(): Array { return arrayOf(FOO, BAR, DEFAULT) diff --git a/plugins/kotlin/idea/tests/testData/intentions/convertEnumToSealedClass/hasComments.kt.after b/plugins/kotlin/idea/tests/testData/intentions/convertEnumToSealedClass/hasComments.kt.after index 7207218c17e8..ff6b5c3e643d 100644 --- a/plugins/kotlin/idea/tests/testData/intentions/convertEnumToSealedClass/hasComments.kt.after +++ b/plugins/kotlin/idea/tests/testData/intentions/convertEnumToSealedClass/hasComments.kt.after @@ -2,20 +2,20 @@ sealed class Test { /** * A */ - object A : Test() // A2 + data object A : Test() // A2 /* B */ - object B : Test() /* B2 */ /* B3 */ + data object B : Test() /* B2 */ /* B3 */ // C - object C : Test() // C2 + data object C : Test() // C2 /** * D */ /* D2 */ /* D3 */ // D4 - object D : Test() /* D5 */ // D6 + data object D : Test() /* D5 */ // D6 companion object { fun values(): Array { return arrayOf(A, B, C, D) diff --git a/plugins/kotlin/idea/tests/testData/intentions/convertEnumToSealedClass/hasCompanion.kt.after b/plugins/kotlin/idea/tests/testData/intentions/convertEnumToSealedClass/hasCompanion.kt.after index cb9b0660b7a7..52cb4d55d0c3 100644 --- a/plugins/kotlin/idea/tests/testData/intentions/convertEnumToSealedClass/hasCompanion.kt.after +++ b/plugins/kotlin/idea/tests/testData/intentions/convertEnumToSealedClass/hasCompanion.kt.after @@ -17,6 +17,6 @@ sealed class Foo { } } - object A : Foo() - object B : Foo() + data object A : Foo() + data object B : Foo() } \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/multiFileLocalInspections/convertSealedSubClassToObject/convertCallableReferenceUsages/after/Seal.kt b/plugins/kotlin/idea/tests/testData/multiFileLocalInspections/convertSealedSubClassToObject/convertCallableReferenceUsages/after/Seal.kt index e0b9734ad13a..c8dec821d4f7 100644 --- a/plugins/kotlin/idea/tests/testData/multiFileLocalInspections/convertSealedSubClassToObject/convertCallableReferenceUsages/after/Seal.kt +++ b/plugins/kotlin/idea/tests/testData/multiFileLocalInspections/convertSealedSubClassToObject/convertCallableReferenceUsages/after/Seal.kt @@ -2,7 +2,7 @@ package seal sealed class Sealed -object SubSealed : Sealed() { +data object SubSealed : Sealed() { class Nested fun internalFunction() {} diff --git a/plugins/kotlin/idea/tests/testData/multiFileLocalInspections/convertSealedSubClassToObject/convertInOtherFiles/after/Seal.kt b/plugins/kotlin/idea/tests/testData/multiFileLocalInspections/convertSealedSubClassToObject/convertInOtherFiles/after/Seal.kt index b0f627a9d2c3..62903db2007f 100644 --- a/plugins/kotlin/idea/tests/testData/multiFileLocalInspections/convertSealedSubClassToObject/convertInOtherFiles/after/Seal.kt +++ b/plugins/kotlin/idea/tests/testData/multiFileLocalInspections/convertSealedSubClassToObject/convertInOtherFiles/after/Seal.kt @@ -2,4 +2,4 @@ package seal sealed class Sealed -object SubSealed : Sealed() \ No newline at end of file +data object SubSealed : Sealed() \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/convertActualEnumToSealedClass/header/header.kt.after b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/convertActualEnumToSealedClass/header/header.kt.after index b9ba6ae15519..dc986602d1ca 100644 --- a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/convertActualEnumToSealedClass/header/header.kt.after +++ b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/convertActualEnumToSealedClass/header/header.kt.after @@ -1,5 +1,5 @@ expect sealed class E { - object A : E - object B : E - object C : E + data object A : E + data object B : E + data object C : E } \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/convertActualEnumToSealedClass/js/impl.kt.after b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/convertActualEnumToSealedClass/js/impl.kt.after index 26049c6b56fd..3b62825209d9 100644 --- a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/convertActualEnumToSealedClass/js/impl.kt.after +++ b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/convertActualEnumToSealedClass/js/impl.kt.after @@ -1,7 +1,7 @@ // "Convert to sealed class" "true" actual sealed class E { - actual object A : E() - actual object B : E() - actual object C : E() + actual data object A : E() + actual data object B : E() + actual data object C : E() } \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/convertActualEnumToSealedClass/jvm/impl.kt.after b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/convertActualEnumToSealedClass/jvm/impl.kt.after index e48b1294659d..00d4bafb1755 100644 --- a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/convertActualEnumToSealedClass/jvm/impl.kt.after +++ b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/convertActualEnumToSealedClass/jvm/impl.kt.after @@ -1,5 +1,5 @@ actual sealed class E { - actual object A : E() - actual object B : E() - actual object C : E() + actual data object A : E() + actual data object B : E() + actual data object C : E() } \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/convertExpectEnumToSealedClass/header/header.kt.after b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/convertExpectEnumToSealedClass/header/header.kt.after index 105dc72c58b5..d74beaae8110 100644 --- a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/convertExpectEnumToSealedClass/header/header.kt.after +++ b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/convertExpectEnumToSealedClass/header/header.kt.after @@ -1,7 +1,7 @@ // "Convert to sealed class" "true" expect sealed class E { - object A : E - object B : E - object C : E + data object A : E + data object B : E + data object C : E } \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/convertExpectEnumToSealedClass/js/impl.kt.after b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/convertExpectEnumToSealedClass/js/impl.kt.after index d0df8206bdd0..62a55fd1a9fa 100644 --- a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/convertExpectEnumToSealedClass/js/impl.kt.after +++ b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/convertExpectEnumToSealedClass/js/impl.kt.after @@ -1,5 +1,5 @@ actual sealed class E { - actual object A : E() - actual object B : E() - actual object C : E() + actual data object A : E() + actual data object B : E() + actual data object C : E() } \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/convertExpectEnumToSealedClass/jvm/impl.kt.after b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/convertExpectEnumToSealedClass/jvm/impl.kt.after index e48b1294659d..00d4bafb1755 100644 --- a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/convertExpectEnumToSealedClass/jvm/impl.kt.after +++ b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/convertExpectEnumToSealedClass/jvm/impl.kt.after @@ -1,5 +1,5 @@ actual sealed class E { - actual object A : E() - actual object B : E() - actual object C : E() + actual data object A : E() + actual data object B : E() + actual data object C : E() } \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/specifySuperExplicitly/abstractSuperCall4.after.kt b/plugins/kotlin/idea/tests/testData/quickfix/specifySuperExplicitly/abstractSuperCall4.after.kt index de5e90eeff86..2148d8936406 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/specifySuperExplicitly/abstractSuperCall4.after.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/specifySuperExplicitly/abstractSuperCall4.after.kt @@ -1,4 +1,5 @@ // "Specify super type 'Foo' explicitly" "true" +// ERROR: Abstract member cannot be accessed directly package three import one.Foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/specifySuperExplicitly/abstractSuperCall4.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/specifySuperExplicitly/abstractSuperCall4.before.Main.kt index c3719b9a26bc..1997ad12bc37 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/specifySuperExplicitly/abstractSuperCall4.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/specifySuperExplicitly/abstractSuperCall4.before.Main.kt @@ -1,4 +1,5 @@ // "Specify super type 'Foo' explicitly" "true" +// ERROR: Abstract member cannot be accessed directly package three import two.Derived diff --git a/plugins/kotlin/idea/tests/testData/quickfix/specifySuperExplicitly/abstractSuperCallWithExplicitSuper3.after.kt b/plugins/kotlin/idea/tests/testData/quickfix/specifySuperExplicitly/abstractSuperCallWithExplicitSuper3.after.kt index de5e90eeff86..2148d8936406 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/specifySuperExplicitly/abstractSuperCallWithExplicitSuper3.after.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/specifySuperExplicitly/abstractSuperCallWithExplicitSuper3.after.kt @@ -1,4 +1,5 @@ // "Specify super type 'Foo' explicitly" "true" +// ERROR: Abstract member cannot be accessed directly package three import one.Foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/specifySuperExplicitly/abstractSuperCallWithExplicitSuper3.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/specifySuperExplicitly/abstractSuperCallWithExplicitSuper3.before.Main.kt index 1c2b177e3907..7a4f4c7eea17 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/specifySuperExplicitly/abstractSuperCallWithExplicitSuper3.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/specifySuperExplicitly/abstractSuperCallWithExplicitSuper3.before.Main.kt @@ -1,4 +1,5 @@ // "Specify super type 'Foo' explicitly" "true" +// ERROR: Abstract member cannot be accessed directly package three import two.Derived diff --git a/plugins/kotlin/j2k/new/tests/testData/copyPaste/FieldWithNoModifierAndNoSemicolon.expected.kt b/plugins/kotlin/j2k/new/tests/testData/copyPaste/FieldWithNoModifierAndNoSemicolon.expected.kt index d079c1453c75..5420ccf2bbe1 100644 --- a/plugins/kotlin/j2k/new/tests/testData/copyPaste/FieldWithNoModifierAndNoSemicolon.expected.kt +++ b/plugins/kotlin/j2k/new/tests/testData/copyPaste/FieldWithNoModifierAndNoSemicolon.expected.kt @@ -1,4 +1,6 @@ package to +import kotlin.concurrent.Volatile + @Volatile var field = 1 \ No newline at end of file diff --git a/plugins/kotlin/j2k/new/tests/testData/newJ2k/field/volatileTransientAndStrictFp.kt b/plugins/kotlin/j2k/new/tests/testData/newJ2k/field/volatileTransientAndStrictFp.kt index 94863507fee0..c7bd94228b35 100644 --- a/plugins/kotlin/j2k/new/tests/testData/newJ2k/field/volatileTransientAndStrictFp.kt +++ b/plugins/kotlin/j2k/new/tests/testData/newJ2k/field/volatileTransientAndStrictFp.kt @@ -1,4 +1,6 @@ // ERROR: This annotation is not applicable to target 'member property with backing field' +import kotlin.concurrent.Volatile + internal class A { @Deprecated("") @Volatile diff --git a/plugins/kotlin/j2k/new/tests/testData/partialConverter/field/volatileTransientAndStrictFp.kt b/plugins/kotlin/j2k/new/tests/testData/partialConverter/field/volatileTransientAndStrictFp.kt index 41648227003c..e6b85b90b267 100644 --- a/plugins/kotlin/j2k/new/tests/testData/partialConverter/field/volatileTransientAndStrictFp.kt +++ b/plugins/kotlin/j2k/new/tests/testData/partialConverter/field/volatileTransientAndStrictFp.kt @@ -1,4 +1,6 @@ // ERROR: This annotation is not applicable to target 'member property with backing field' +import kotlin.concurrent.Volatile + internal class A { @Deprecated("") @Volatile diff --git a/plugins/kotlin/uast/uast-kotlin-fir/tests/testData/legacyRenderLog/CommentOwners.log.fir.txt b/plugins/kotlin/uast/uast-kotlin-fir/tests/testData/legacyRenderLog/CommentOwners.log.fir.txt index c347948f0810..e02caf247702 100644 --- a/plugins/kotlin/uast/uast-kotlin-fir/tests/testData/legacyRenderLog/CommentOwners.log.fir.txt +++ b/plugins/kotlin/uast/uast-kotlin-fir/tests/testData/legacyRenderLog/CommentOwners.log.fir.txt @@ -79,4 +79,5 @@ UFile (package = ) UMethod (name = values) UMethod (name = valueOf) UParameter (name = value) + UMethod (name = getEntries) UMethod (name = MyBooleanEnum) diff --git a/plugins/kotlin/uast/uast-kotlin-fir/tests/testData/legacyRenderLog/CommentOwners.render.fir.txt b/plugins/kotlin/uast/uast-kotlin-fir/tests/testData/legacyRenderLog/CommentOwners.render.fir.txt index 532b6c42848a..29c64cad11a3 100644 --- a/plugins/kotlin/uast/uast-kotlin-fir/tests/testData/legacyRenderLog/CommentOwners.render.fir.txt +++ b/plugins/kotlin/uast/uast-kotlin-fir/tests/testData/legacyRenderLog/CommentOwners.render.fir.txt @@ -42,5 +42,6 @@ public final enum MyBooleanEnum { @null FALSE public static fun values() : MyBooleanEnum[] = UastEmptyExpression public static fun valueOf(value: java.lang.String) : MyBooleanEnum = UastEmptyExpression + public static fun getEntries() : kotlin.enums.EnumEntries = UastEmptyExpression private fun MyBooleanEnum() = UastEmptyExpression } diff --git a/plugins/kotlin/uast/uast-kotlin-fir/tests/testData/legacyRenderLog/EnumValueMembers.log.fir.txt b/plugins/kotlin/uast/uast-kotlin-fir/tests/testData/legacyRenderLog/EnumValueMembers.log.fir.txt index 19bc550ca9ca..88159df1b88e 100644 --- a/plugins/kotlin/uast/uast-kotlin-fir/tests/testData/legacyRenderLog/EnumValueMembers.log.fir.txt +++ b/plugins/kotlin/uast/uast-kotlin-fir/tests/testData/legacyRenderLog/EnumValueMembers.log.fir.txt @@ -16,6 +16,7 @@ UFile (package = ) UMethod (name = values) UMethod (name = valueOf) UParameter (name = value) + UMethod (name = getEntries) UMethod (name = getValue) UMethod (name = Style) UParameter (name = value) diff --git a/plugins/kotlin/uast/uast-kotlin-fir/tests/testData/legacyRenderLog/EnumValueMembers.render.fir.txt b/plugins/kotlin/uast/uast-kotlin-fir/tests/testData/legacyRenderLog/EnumValueMembers.render.fir.txt index e35846764f59..4c8eb2d3fb41 100644 --- a/plugins/kotlin/uast/uast-kotlin-fir/tests/testData/legacyRenderLog/EnumValueMembers.render.fir.txt +++ b/plugins/kotlin/uast/uast-kotlin-fir/tests/testData/legacyRenderLog/EnumValueMembers.render.fir.txt @@ -9,6 +9,7 @@ public abstract enum Style { public abstract fun getExitAnimation() : java.lang.String = UastEmptyExpression public static fun values() : Style[] = UastEmptyExpression public static fun valueOf(value: java.lang.String) : Style = UastEmptyExpression + public static fun getEntries() : kotlin.enums.EnumEntries