diff --git a/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/EnumClassLowering.kt b/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/EnumClassLowering.kt index 06f2ddc3328..306d1168d71 100644 --- a/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/EnumClassLowering.kt +++ b/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/EnumClassLowering.kt @@ -43,6 +43,7 @@ import org.jetbrains.kotlin.ir.util.* import org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid import org.jetbrains.kotlin.ir.visitors.transformChildrenVoid import org.jetbrains.kotlin.name.Name +import org.jetbrains.kotlin.name.SpecialNames internal val enumClassPhase = makeIrFilePhase( ::EnumClassLowering, @@ -122,21 +123,26 @@ private class EnumClassLowering(private val context: JvmBackendContext) : ClassL // Construct the synthetic $VALUES field, which contains an array of all enum entries by calling $values() val valuesField = buildValuesField(valuesHelperFunction) - val entriesField: IrField? - if (supportsEnumEntries) { - // Constructs the synthetic $entries() function that returns plain $VALUES without copy - val entriesHelperFunction = buildEntriesHelperFunction(valuesField) + val entriesField = when { + irClass.declarations.any { it.isGetEntriesFunction } -> { + // Constructs the synthetic $entries() function that returns plain $VALUES without copy + val entriesHelperFunction = buildEntriesHelperFunction(valuesField) - /* - * Add synthetic $ENTRIES field and binds its initializer to - * ``` - * val supplier: () -> E[] = indy LMF $entries - * $ENTRIES = EnumEntries(supplier) - * ``` - */ - entriesField = buildEntriesField(entriesHelperFunction) - } else { - entriesField = null + /* + * Add synthetic $ENTRIES field and binds its initializer to + * ``` + * val supplier: () -> E[] = indy LMF $entries + * $ENTRIES = EnumEntries(supplier) + * ``` + */ + buildEntriesField(entriesHelperFunction) + } + supportsEnumEntries -> { + error("kotlin.enums.EnumEntries is not available to the frontend. Is non-full kotlin stdlib being used?") + } + else -> { + null + } } // Add synthetic parameters to enum constructors and implement the values and valueOf functions @@ -146,6 +152,9 @@ private class EnumClassLowering(private val context: JvmBackendContext) : ClassL irClass.transformChildrenVoid(EnumClassCallTransformer()) } + private val IrDeclaration.isGetEntriesFunction: Boolean + get() = this is IrFunction && name == SpecialNames.ENUM_GET_ENTRIES && origin == IrDeclarationOrigin.ENUM_CLASS_SPECIAL_MEMBER + private fun buildEnumEntryField(enumEntry: IrEnumEntry): IrField = context.cachedDeclarations.getFieldForEnumEntry(enumEntry).apply { initializer = IrExpressionBodyImpl(enumEntry.initializerExpression!!.expression.patchDeclarationParents(this)) diff --git a/compiler/testData/codegen/asmLike/typeAnnotations/enumClassConstructor.asm.ir.txt b/compiler/testData/codegen/asmLike/typeAnnotations/enumClassConstructor.asm.ir.txt index f33bfee8ab9..5a1952b2bb7 100644 --- a/compiler/testData/codegen/asmLike/typeAnnotations/enumClassConstructor.asm.ir.txt +++ b/compiler/testData/codegen/asmLike/typeAnnotations/enumClassConstructor.asm.ir.txt @@ -25,6 +25,10 @@ public class foo/Kotlin : java/lang/Enum { public void (java.lang.String $enum$name, int $enum$ordinal, java.lang.String s, kotlin.jvm.internal.DefaultConstructorMarker $constructor_marker) + ()Lkotlin/enums/EnumEntries; + public static kotlin.enums.EnumEntries getEntries() + @Lorg/jetbrains/annotations/NotNull;([]) // invisible + public static foo.Kotlin valueOf(java.lang.String value) public static foo.Kotlin[] values() diff --git a/compiler/testData/codegen/asmLike/typeAnnotations/enumClassConstructor.kt b/compiler/testData/codegen/asmLike/typeAnnotations/enumClassConstructor.kt index 0eb1aaa408b..b9d22ab43ca 100644 --- a/compiler/testData/codegen/asmLike/typeAnnotations/enumClassConstructor.kt +++ b/compiler/testData/codegen/asmLike/typeAnnotations/enumClassConstructor.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // IR_DIFFERENCE // EMIT_JVM_TYPE_ANNOTATIONS // RENDER_ANNOTATIONS diff --git a/compiler/testData/codegen/box/annotations/annotationOnWhen.kt b/compiler/testData/codegen/box/annotations/annotationOnWhen.kt index 2acd8d99853..00847779653 100644 --- a/compiler/testData/codegen/box/annotations/annotationOnWhen.kt +++ b/compiler/testData/codegen/box/annotations/annotationOnWhen.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // TARGET_BACKEND: JVM enum class SomeEnum { diff --git a/compiler/testData/codegen/box/annotations/nestedClassesInAnnotations.kt b/compiler/testData/codegen/box/annotations/nestedClassesInAnnotations.kt index 25c4b4546af..53ac5fead09 100644 --- a/compiler/testData/codegen/box/annotations/nestedClassesInAnnotations.kt +++ b/compiler/testData/codegen/box/annotations/nestedClassesInAnnotations.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // !LANGUAGE: +NestedClassesInAnnotations annotation class Foo(val kind: Kind) { diff --git a/compiler/testData/codegen/box/bridges/simpleEnum.kt b/compiler/testData/codegen/box/bridges/simpleEnum.kt index 0446aba8c33..4d809ea7c10 100644 --- a/compiler/testData/codegen/box/bridges/simpleEnum.kt +++ b/compiler/testData/codegen/box/bridges/simpleEnum.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB interface A { open fun foo(t: T) = "A" } diff --git a/compiler/testData/codegen/box/bridges/substitutionInSuperClass/enum.kt b/compiler/testData/codegen/box/bridges/substitutionInSuperClass/enum.kt index 243498038e6..685998480b9 100644 --- a/compiler/testData/codegen/box/bridges/substitutionInSuperClass/enum.kt +++ b/compiler/testData/codegen/box/bridges/substitutionInSuperClass/enum.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB interface A { open fun foo(t: T) = "A" } diff --git a/compiler/testData/codegen/box/callableReference/bound/enumEntryMember.kt b/compiler/testData/codegen/box/callableReference/bound/enumEntryMember.kt index e5f9ff6f262..b00ac9c2c29 100644 --- a/compiler/testData/codegen/box/callableReference/bound/enumEntryMember.kt +++ b/compiler/testData/codegen/box/callableReference/bound/enumEntryMember.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // IGNORE_BACKEND: WASM // WASM_MUTE_REASON: FUNCTION_REFERENCES // IGNORE_BACKEND: JS, JS_IR diff --git a/compiler/testData/codegen/box/callableReference/function/enumValueOfMethod.kt b/compiler/testData/codegen/box/callableReference/function/enumValueOfMethod.kt index 21a53adfff3..ef33b51f0ba 100644 --- a/compiler/testData/codegen/box/callableReference/function/enumValueOfMethod.kt +++ b/compiler/testData/codegen/box/callableReference/function/enumValueOfMethod.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class E { ENTRY } diff --git a/compiler/testData/codegen/box/callableReference/function/local/enumExtendsTrait.kt b/compiler/testData/codegen/box/callableReference/function/local/enumExtendsTrait.kt index 5ae74283aee..4ca0e53bd80 100644 --- a/compiler/testData/codegen/box/callableReference/function/local/enumExtendsTrait.kt +++ b/compiler/testData/codegen/box/callableReference/function/local/enumExtendsTrait.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB interface Named { val name: String } diff --git a/compiler/testData/codegen/box/callableReference/property/enumNameOrdinal.kt b/compiler/testData/codegen/box/callableReference/property/enumNameOrdinal.kt index 10ccfbdee1e..0432dcb6f8c 100644 --- a/compiler/testData/codegen/box/callableReference/property/enumNameOrdinal.kt +++ b/compiler/testData/codegen/box/callableReference/property/enumNameOrdinal.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class E { I } diff --git a/compiler/testData/codegen/box/callableReference/property/inEnum.kt b/compiler/testData/codegen/box/callableReference/property/inEnum.kt index 87ccf327b55..3d7c7b81ecc 100644 --- a/compiler/testData/codegen/box/callableReference/property/inEnum.kt +++ b/compiler/testData/codegen/box/callableReference/property/inEnum.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB import kotlin.reflect.KProperty1 class Q { diff --git a/compiler/testData/codegen/box/classes/kt2626.kt b/compiler/testData/codegen/box/classes/kt2626.kt index 34ba1d2ad8d..4407a1de86f 100644 --- a/compiler/testData/codegen/box/classes/kt2626.kt +++ b/compiler/testData/codegen/box/classes/kt2626.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB package example2 fun box() = Context.OsType.OK.toString() diff --git a/compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerEnumEntryCapturedInLambdaInInnerClass.kt b/compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerEnumEntryCapturedInLambdaInInnerClass.kt index 1efe120d20a..5dbca0353d0 100644 --- a/compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerEnumEntryCapturedInLambdaInInnerClass.kt +++ b/compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerEnumEntryCapturedInLambdaInInnerClass.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB abstract class Base(val fn: () -> Test) enum class Test(val ok: String) { diff --git a/compiler/testData/codegen/box/compileKotlinAgainstKotlin/companionObjectInEnum.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/companionObjectInEnum.kt index 2ac79105a2e..db5ca7d3f92 100644 --- a/compiler/testData/codegen/box/compileKotlinAgainstKotlin/companionObjectInEnum.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/companionObjectInEnum.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // MODULE: lib // FILE: A.kt diff --git a/compiler/testData/codegen/box/compileKotlinAgainstKotlin/enum.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/enum.kt index 9eb2f9c1842..6ae27ab5412 100644 --- a/compiler/testData/codegen/box/compileKotlinAgainstKotlin/enum.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/enum.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // MODULE: lib // FILE: A.kt diff --git a/compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedClassInAnnotationArgument.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedClassInAnnotationArgument.kt index 29b87a9af70..83abac13ad7 100644 --- a/compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedClassInAnnotationArgument.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedClassInAnnotationArgument.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // MODULE: lib // FILE: 1.kt diff --git a/compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedEnum.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedEnum.kt index e5ef9e1f522..1e971cf1039 100644 --- a/compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedEnum.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedEnum.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // MODULE: lib // FILE: A.kt diff --git a/compiler/testData/codegen/box/compileKotlinAgainstKotlin/starImportEnum.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/starImportEnum.kt index 31e939b7f0a..989dc3e411d 100644 --- a/compiler/testData/codegen/box/compileKotlinAgainstKotlin/starImportEnum.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/starImportEnum.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // MODULE: lib // FILE: A.kt diff --git a/compiler/testData/codegen/box/defaultArguments/constructor/enum.kt b/compiler/testData/codegen/box/defaultArguments/constructor/enum.kt index edc9e061d4c..e8bf90312bc 100644 --- a/compiler/testData/codegen/box/defaultArguments/constructor/enum.kt +++ b/compiler/testData/codegen/box/defaultArguments/constructor/enum.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class A(val a: Int = 1) { FIRST(), SECOND(2) diff --git a/compiler/testData/codegen/box/defaultArguments/constructor/enumWithOneDefArg.kt b/compiler/testData/codegen/box/defaultArguments/constructor/enumWithOneDefArg.kt index 339ab868c0d..64dbf69e198 100644 --- a/compiler/testData/codegen/box/defaultArguments/constructor/enumWithOneDefArg.kt +++ b/compiler/testData/codegen/box/defaultArguments/constructor/enumWithOneDefArg.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class Foo(val a: Int = 1, val b: String) { B(2, "b"), C(b = "b") diff --git a/compiler/testData/codegen/box/defaultArguments/constructor/enumWithTwoDefArgs.kt b/compiler/testData/codegen/box/defaultArguments/constructor/enumWithTwoDefArgs.kt index 7a7d6db0814..1e86fa00211 100644 --- a/compiler/testData/codegen/box/defaultArguments/constructor/enumWithTwoDefArgs.kt +++ b/compiler/testData/codegen/box/defaultArguments/constructor/enumWithTwoDefArgs.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class Foo(val a: Int = 1, val b: String = "a") { A(), B(2, "b"), diff --git a/compiler/testData/codegen/box/defaultArguments/constructor/enumWithTwoDoubleDefArgs.kt b/compiler/testData/codegen/box/defaultArguments/constructor/enumWithTwoDoubleDefArgs.kt index e461fd6a32e..d7af534e531 100644 --- a/compiler/testData/codegen/box/defaultArguments/constructor/enumWithTwoDoubleDefArgs.kt +++ b/compiler/testData/codegen/box/defaultArguments/constructor/enumWithTwoDoubleDefArgs.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class Foo(val a: Double = 1.0, val b: Double = 1.0) { A(), B(2.0, 2.0), diff --git a/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/memberExtensionPropertyAndImportFromObject.fir.txt b/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/memberExtensionPropertyAndImportFromObject.fir.txt deleted file mode 100644 index 1f9c82e0fb3..00000000000 --- a/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/memberExtensionPropertyAndImportFromObject.fir.txt +++ /dev/null @@ -1,40 +0,0 @@ -@kotlin.Metadata -public final class Delegate { - // source: 'memberExtensionPropertyAndImportFromObject.kt' - public method (): void - public final @org.jetbrains.annotations.NotNull method getValue(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.Nullable p1: java.lang.Object): java.lang.String -} - -@kotlin.Metadata -public final enum class E { - // source: 'memberExtensionPropertyAndImportFromObject.kt' - private synthetic final static field $ENTRIES: kotlin.enums.EnumEntries - private synthetic final static field $VALUES: E[] - public final enum static field X: E - private synthetic final static method $entries(): E[] - private synthetic final static method $values(): E[] - static method (): void - private method (p0: java.lang.String, p1: int): void - public static @org.jetbrains.annotations.NotNull method getEntries(): kotlin.enums.EnumEntries - public static method valueOf(p0: java.lang.String): E - public static method values(): E[] -} - -@kotlin.Metadata -public final class MemberExtensionPropertyAndImportFromObjectKt { - // source: 'memberExtensionPropertyAndImportFromObject.kt' - synthetic final static field $$delegatedProperties: kotlin.reflect.KProperty[] - private final static @org.jetbrains.annotations.NotNull field result$delegate: Delegate - static method (): void - public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String - public final static @org.jetbrains.annotations.NotNull method getResult(): java.lang.String -} - -@kotlin.Metadata -public final class O { - // source: 'memberExtensionPropertyAndImportFromObject.kt' - public final static @org.jetbrains.annotations.NotNull field INSTANCE: O - static method (): void - private method (): void - public final @org.jetbrains.annotations.NotNull method getD(@org.jetbrains.annotations.NotNull p0: E): Delegate -} diff --git a/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/memberExtensionPropertyAndImportFromObject.ir.txt b/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/memberExtensionPropertyAndImportFromObject.ir.txt index b1bab65a2f4..1f9c82e0fb3 100644 --- a/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/memberExtensionPropertyAndImportFromObject.ir.txt +++ b/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/memberExtensionPropertyAndImportFromObject.ir.txt @@ -15,6 +15,7 @@ public final enum class E { private synthetic final static method $values(): E[] static method (): void private method (p0: java.lang.String, p1: int): void + public static @org.jetbrains.annotations.NotNull method getEntries(): kotlin.enums.EnumEntries public static method valueOf(p0: java.lang.String): E public static method values(): E[] } diff --git a/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/memberExtensionPropertyAndImportFromObject.kt b/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/memberExtensionPropertyAndImportFromObject.kt index 28cb40cfe03..9354c586b3c 100644 --- a/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/memberExtensionPropertyAndImportFromObject.kt +++ b/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/memberExtensionPropertyAndImportFromObject.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// WITH_STDLIB import O.d diff --git a/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/memberExtensionPropertyAndLocalDelegatedProperty.fir.txt b/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/memberExtensionPropertyAndLocalDelegatedProperty.fir.txt deleted file mode 100644 index e6ad914ede2..00000000000 --- a/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/memberExtensionPropertyAndLocalDelegatedProperty.fir.txt +++ /dev/null @@ -1,39 +0,0 @@ -@kotlin.Metadata -public final class Delegate { - // source: 'memberExtensionPropertyAndLocalDelegatedProperty.kt' - public method (): void - public final @org.jetbrains.annotations.NotNull method getValue(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.Nullable p1: java.lang.Object): java.lang.String -} - -@kotlin.Metadata -public final enum class E { - // source: 'memberExtensionPropertyAndLocalDelegatedProperty.kt' - private synthetic final static field $ENTRIES: kotlin.enums.EnumEntries - private synthetic final static field $VALUES: E[] - public final enum static field X: E - private synthetic final static method $entries(): E[] - private synthetic final static method $values(): E[] - static method (): void - private method (p0: java.lang.String, p1: int): void - public static @org.jetbrains.annotations.NotNull method getEntries(): kotlin.enums.EnumEntries - public static method valueOf(p0: java.lang.String): E - public static method values(): E[] -} - -@kotlin.Metadata -public final class MemberExtensionPropertyAndLocalDelegatedPropertyKt { - // source: 'memberExtensionPropertyAndLocalDelegatedProperty.kt' - synthetic final static field $$delegatedProperties: kotlin.reflect.KProperty[] - static method (): void - private final static method box$lambda$1$lambda$0(p0: Delegate): java.lang.String - public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String -} - -@kotlin.Metadata -public final class O { - // source: 'memberExtensionPropertyAndLocalDelegatedProperty.kt' - public final static @org.jetbrains.annotations.NotNull field INSTANCE: O - static method (): void - private method (): void - public final @org.jetbrains.annotations.NotNull method getD(@org.jetbrains.annotations.NotNull p0: E): Delegate -} diff --git a/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/memberExtensionPropertyAndLocalDelegatedProperty.ir.txt b/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/memberExtensionPropertyAndLocalDelegatedProperty.ir.txt index 1299dcde546..e6ad914ede2 100644 --- a/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/memberExtensionPropertyAndLocalDelegatedProperty.ir.txt +++ b/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/memberExtensionPropertyAndLocalDelegatedProperty.ir.txt @@ -15,6 +15,7 @@ public final enum class E { private synthetic final static method $values(): E[] static method (): void private method (p0: java.lang.String, p1: int): void + public static @org.jetbrains.annotations.NotNull method getEntries(): kotlin.enums.EnumEntries public static method valueOf(p0: java.lang.String): E public static method values(): E[] } diff --git a/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/memberExtensionPropertyAndLocalDelegatedProperty.kt b/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/memberExtensionPropertyAndLocalDelegatedProperty.kt index da75dca67f1..8c3451b1784 100644 --- a/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/memberExtensionPropertyAndLocalDelegatedProperty.kt +++ b/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/memberExtensionPropertyAndLocalDelegatedProperty.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// WITH_STDLIB enum class E { X } diff --git a/compiler/testData/codegen/box/delegatedProperty/delegatedPropertyInEnum.kt b/compiler/testData/codegen/box/delegatedProperty/delegatedPropertyInEnum.kt index 6b5e34adeb9..8addc603e62 100644 --- a/compiler/testData/codegen/box/delegatedProperty/delegatedPropertyInEnum.kt +++ b/compiler/testData/codegen/box/delegatedProperty/delegatedPropertyInEnum.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // IGNORE_BACKEND: JVM // IGNORE_LIGHT_ANALYSIS diff --git a/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnEnum1.kt b/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnEnum1.kt index 6491d8e0cc9..2eafc419f86 100644 --- a/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnEnum1.kt +++ b/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnEnum1.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class A { ONE, TWO; diff --git a/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnEnum2.kt b/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnEnum2.kt index 95eb4b9c827..ce1d0c91e14 100644 --- a/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnEnum2.kt +++ b/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnEnum2.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class A { ONE, TWO diff --git a/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnImportedEnum1.kt b/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnImportedEnum1.kt index d627dad85a8..6613e03b822 100644 --- a/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnImportedEnum1.kt +++ b/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnImportedEnum1.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB import A.ONE enum class A { diff --git a/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnImportedEnum2.kt b/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnImportedEnum2.kt index 53ecfc65908..892c9ba2de7 100644 --- a/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnImportedEnum2.kt +++ b/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnImportedEnum2.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB import A.ONE enum class A { diff --git a/compiler/testData/codegen/box/enum/abstractMethodInEnum.kt b/compiler/testData/codegen/box/enum/abstractMethodInEnum.kt index 0d3ed6de674..1986e96b7da 100644 --- a/compiler/testData/codegen/box/enum/abstractMethodInEnum.kt +++ b/compiler/testData/codegen/box/enum/abstractMethodInEnum.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class A() { ENTRY(){ override fun t() = "OK"}; diff --git a/compiler/testData/codegen/box/enum/abstractNestedClass.kt b/compiler/testData/codegen/box/enum/abstractNestedClass.kt index 3994bd54e17..ceb2d051cbc 100644 --- a/compiler/testData/codegen/box/enum/abstractNestedClass.kt +++ b/compiler/testData/codegen/box/enum/abstractNestedClass.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class E { ENTRY; diff --git a/compiler/testData/codegen/box/enum/annotatedParameter.kt b/compiler/testData/codegen/box/enum/annotatedParameter.kt index 1bff61e2593..f36137d319b 100644 --- a/compiler/testData/codegen/box/enum/annotatedParameter.kt +++ b/compiler/testData/codegen/box/enum/annotatedParameter.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // TARGET_BACKEND: JVM // FILE: Foo.java diff --git a/compiler/testData/codegen/box/enum/annotatedParameter2.kt b/compiler/testData/codegen/box/enum/annotatedParameter2.kt index 4d49865ade5..17bb45e442e 100644 --- a/compiler/testData/codegen/box/enum/annotatedParameter2.kt +++ b/compiler/testData/codegen/box/enum/annotatedParameter2.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // TARGET_BACKEND: JVM // FILE: Foo.java diff --git a/compiler/testData/codegen/box/enum/asReturnExpression.kt b/compiler/testData/codegen/box/enum/asReturnExpression.kt index c001e02763a..30d0651ce74 100644 --- a/compiler/testData/codegen/box/enum/asReturnExpression.kt +++ b/compiler/testData/codegen/box/enum/asReturnExpression.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // http://youtrack.jetbrains.com/issue/KT-2167 enum class Season { diff --git a/compiler/testData/codegen/box/enum/bigEnum.kt b/compiler/testData/codegen/box/enum/bigEnum.kt index 96202b7a180..183f6289bc2 100644 --- a/compiler/testData/codegen/box/enum/bigEnum.kt +++ b/compiler/testData/codegen/box/enum/bigEnum.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // TARGET_BACKEND: JVM // IGNORE_BACKEND: JVM diff --git a/compiler/testData/codegen/box/enum/companionAccessingEnumValue.kt b/compiler/testData/codegen/box/enum/companionAccessingEnumValue.kt index ea358a6d4da..01fd72f676d 100644 --- a/compiler/testData/codegen/box/enum/companionAccessingEnumValue.kt +++ b/compiler/testData/codegen/box/enum/companionAccessingEnumValue.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB private var logs = "" enum class Foo(val text: String) { diff --git a/compiler/testData/codegen/box/enum/companionObjectInEnum.kt b/compiler/testData/codegen/box/enum/companionObjectInEnum.kt index 3e6d423f64e..ab9186f3e02 100644 --- a/compiler/testData/codegen/box/enum/companionObjectInEnum.kt +++ b/compiler/testData/codegen/box/enum/companionObjectInEnum.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class Game { ROCK, PAPER, diff --git a/compiler/testData/codegen/box/enum/constructorWithReordering.kt b/compiler/testData/codegen/box/enum/constructorWithReordering.kt index 0ff1d169734..28ca40fdcfa 100644 --- a/compiler/testData/codegen/box/enum/constructorWithReordering.kt +++ b/compiler/testData/codegen/box/enum/constructorWithReordering.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // IGNORE_BACKEND: JS fun f(): String = "O" fun g(): String = "K" diff --git a/compiler/testData/codegen/box/enum/declaringClassOnEnumObject.kt b/compiler/testData/codegen/box/enum/declaringClassOnEnumObject.kt index 14258af4cf7..93a359f1800 100644 --- a/compiler/testData/codegen/box/enum/declaringClassOnEnumObject.kt +++ b/compiler/testData/codegen/box/enum/declaringClassOnEnumObject.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // TARGET_BACKEND: JVM // IGNORE_BACKEND_K2: JVM_IR // K2 status: declaringClass is error for enums since Kotlin 1.9 diff --git a/compiler/testData/codegen/box/enum/deepInnerClassInEnumEntryClass.kt b/compiler/testData/codegen/box/enum/deepInnerClassInEnumEntryClass.kt index 4c12585119f..02b4db55de0 100644 --- a/compiler/testData/codegen/box/enum/deepInnerClassInEnumEntryClass.kt +++ b/compiler/testData/codegen/box/enum/deepInnerClassInEnumEntryClass.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class A { X { val x = "OK" diff --git a/compiler/testData/codegen/box/enum/deepInnerClassInEnumEntryClass2.kt b/compiler/testData/codegen/box/enum/deepInnerClassInEnumEntryClass2.kt index 958b0be830f..06106477160 100644 --- a/compiler/testData/codegen/box/enum/deepInnerClassInEnumEntryClass2.kt +++ b/compiler/testData/codegen/box/enum/deepInnerClassInEnumEntryClass2.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class A { X { val k = "K" diff --git a/compiler/testData/codegen/box/enum/defaultCtor/constructorWithDefaultArguments.kt b/compiler/testData/codegen/box/enum/defaultCtor/constructorWithDefaultArguments.kt index fcdaf5b62ae..0de7485b39d 100644 --- a/compiler/testData/codegen/box/enum/defaultCtor/constructorWithDefaultArguments.kt +++ b/compiler/testData/codegen/box/enum/defaultCtor/constructorWithDefaultArguments.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class Test(val str: String = "OK") { OK } diff --git a/compiler/testData/codegen/box/enum/defaultCtor/constructorWithVararg.kt b/compiler/testData/codegen/box/enum/defaultCtor/constructorWithVararg.kt index f293632dffa..4409051fcd6 100644 --- a/compiler/testData/codegen/box/enum/defaultCtor/constructorWithVararg.kt +++ b/compiler/testData/codegen/box/enum/defaultCtor/constructorWithVararg.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class Test(vararg xs: Int) { OK; val values = xs diff --git a/compiler/testData/codegen/box/enum/defaultCtor/entryClassConstructorWithDefaultArguments.kt b/compiler/testData/codegen/box/enum/defaultCtor/entryClassConstructorWithDefaultArguments.kt index dfe8da0b5ca..2b163ba842b 100644 --- a/compiler/testData/codegen/box/enum/defaultCtor/entryClassConstructorWithDefaultArguments.kt +++ b/compiler/testData/codegen/box/enum/defaultCtor/entryClassConstructorWithDefaultArguments.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class Test(val str: String = "OK") { OK { fun foo() {} diff --git a/compiler/testData/codegen/box/enum/defaultCtor/entryClassConstructorWithVarargs.kt b/compiler/testData/codegen/box/enum/defaultCtor/entryClassConstructorWithVarargs.kt index b5d7511a0b0..e2cde6381c0 100644 --- a/compiler/testData/codegen/box/enum/defaultCtor/entryClassConstructorWithVarargs.kt +++ b/compiler/testData/codegen/box/enum/defaultCtor/entryClassConstructorWithVarargs.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // IGNORE_BACKEND: JS diff --git a/compiler/testData/codegen/box/enum/defaultCtor/noPrimaryConstructor.kt b/compiler/testData/codegen/box/enum/defaultCtor/noPrimaryConstructor.kt index 2426cc0538e..10ab2f47b4b 100644 --- a/compiler/testData/codegen/box/enum/defaultCtor/noPrimaryConstructor.kt +++ b/compiler/testData/codegen/box/enum/defaultCtor/noPrimaryConstructor.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // IGNORE_BACKEND_K2: JS_IR, NATIVE enum class Test { diff --git a/compiler/testData/codegen/box/enum/defaultCtor/secondaryConstructorWithDefaultArguments.kt b/compiler/testData/codegen/box/enum/defaultCtor/secondaryConstructorWithDefaultArguments.kt index 995cc739d2e..58c06b9d1e2 100644 --- a/compiler/testData/codegen/box/enum/defaultCtor/secondaryConstructorWithDefaultArguments.kt +++ b/compiler/testData/codegen/box/enum/defaultCtor/secondaryConstructorWithDefaultArguments.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // IGNORE_BACKEND_K2: JS_IR, NATIVE enum class Test(val x: Int, val str: String) { OK; diff --git a/compiler/testData/codegen/box/enum/defaultCtor/secondaryConstructorWithVararg.kt b/compiler/testData/codegen/box/enum/defaultCtor/secondaryConstructorWithVararg.kt index 941c0ec86d9..74b92582d85 100644 --- a/compiler/testData/codegen/box/enum/defaultCtor/secondaryConstructorWithVararg.kt +++ b/compiler/testData/codegen/box/enum/defaultCtor/secondaryConstructorWithVararg.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // IGNORE_BACKEND_K2: JS_IR, NATIVE enum class Test(val x: Int, val str: String) { OK; diff --git a/compiler/testData/codegen/box/enum/emptyConstructor.kt b/compiler/testData/codegen/box/enum/emptyConstructor.kt index 9c0040e25c6..3e82ce88983 100644 --- a/compiler/testData/codegen/box/enum/emptyConstructor.kt +++ b/compiler/testData/codegen/box/enum/emptyConstructor.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // IGNORE_BACKEND_K2: JS_IR, NATIVE package test diff --git a/compiler/testData/codegen/box/enum/emptyEnumValuesValueOf.kt b/compiler/testData/codegen/box/enum/emptyEnumValuesValueOf.kt index ca89f7a37d0..410c1bfbe56 100644 --- a/compiler/testData/codegen/box/enum/emptyEnumValuesValueOf.kt +++ b/compiler/testData/codegen/box/enum/emptyEnumValuesValueOf.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class Empty diff --git a/compiler/testData/codegen/box/enum/enumCompanionInit.kt b/compiler/testData/codegen/box/enum/enumCompanionInit.kt index f7d2b29b8b9..c6a4c7ff51c 100644 --- a/compiler/testData/codegen/box/enum/enumCompanionInit.kt +++ b/compiler/testData/codegen/box/enum/enumCompanionInit.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // DONT_TARGET_EXACT_BACKEND: JS // DONT_TARGET_EXACT_BACKEND: JS_IR // DONT_TARGET_EXACT_BACKEND: JS_IR_ES6 diff --git a/compiler/testData/codegen/box/enum/enumConstructorParameterClashWithDefaults.kt b/compiler/testData/codegen/box/enum/enumConstructorParameterClashWithDefaults.kt index d641ed44995..c9d0663552a 100644 --- a/compiler/testData/codegen/box/enum/enumConstructorParameterClashWithDefaults.kt +++ b/compiler/testData/codegen/box/enum/enumConstructorParameterClashWithDefaults.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class A( name: String, ordinal: Int diff --git a/compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor1.kt b/compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor1.kt index 135eeffae89..86d64a31d6e 100644 --- a/compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor1.kt +++ b/compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor1.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB interface IFoo { fun foo(): String } diff --git a/compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor2.kt b/compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor2.kt index 7745c582462..7b46cad2e30 100644 --- a/compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor2.kt +++ b/compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor2.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB interface IFoo { fun foo(): String } diff --git a/compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor3.kt b/compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor3.kt index 635103b8b02..f4dc780beec 100644 --- a/compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor3.kt +++ b/compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor3.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB interface IFoo { fun foo(): String } diff --git a/compiler/testData/codegen/box/enum/enumInheritedFromTrait.kt b/compiler/testData/codegen/box/enum/enumInheritedFromTrait.kt index 8171865caed..b94d47a2c40 100644 --- a/compiler/testData/codegen/box/enum/enumInheritedFromTrait.kt +++ b/compiler/testData/codegen/box/enum/enumInheritedFromTrait.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB package test fun box() = MyEnum.E1.f() + MyEnum.E2.f() diff --git a/compiler/testData/codegen/box/enum/enumShort.kt b/compiler/testData/codegen/box/enum/enumShort.kt index 78935006d2b..2cb5dc439a8 100644 --- a/compiler/testData/codegen/box/enum/enumShort.kt +++ b/compiler/testData/codegen/box/enum/enumShort.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class Color(val rgb: Int) { RED(0xff0000), GREEN(0x00ff00), diff --git a/compiler/testData/codegen/box/enum/enumValueOf.kt b/compiler/testData/codegen/box/enum/enumValueOf.kt index 82beff54335..c6ee285747f 100644 --- a/compiler/testData/codegen/box/enum/enumValueOf.kt +++ b/compiler/testData/codegen/box/enum/enumValueOf.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // IGNORE_BACKEND: WASM enum class E { OK } diff --git a/compiler/testData/codegen/box/enum/enumWithLambdaParameter.kt b/compiler/testData/codegen/box/enum/enumWithLambdaParameter.kt index 7316dbdd631..4a18afa234a 100644 --- a/compiler/testData/codegen/box/enum/enumWithLambdaParameter.kt +++ b/compiler/testData/codegen/box/enum/enumWithLambdaParameter.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // KT-4423 Enum with function not compiled // SKIP_MANGLE_VERIFICATION diff --git a/compiler/testData/codegen/box/enum/getEnumEntityByOrdinal.kt b/compiler/testData/codegen/box/enum/getEnumEntityByOrdinal.kt index db0cbdb3609..dc63a6591b8 100644 --- a/compiler/testData/codegen/box/enum/getEnumEntityByOrdinal.kt +++ b/compiler/testData/codegen/box/enum/getEnumEntityByOrdinal.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB package foo enum class X { diff --git a/compiler/testData/codegen/box/enum/inPackage.kt b/compiler/testData/codegen/box/enum/inPackage.kt index 388eb0a0dd3..7bdac5ef508 100644 --- a/compiler/testData/codegen/box/enum/inPackage.kt +++ b/compiler/testData/codegen/box/enum/inPackage.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB package test enum class Season { diff --git a/compiler/testData/codegen/box/enum/inclassobj.kt b/compiler/testData/codegen/box/enum/inclassobj.kt index 5006013d4b7..269dbe76318 100644 --- a/compiler/testData/codegen/box/enum/inclassobj.kt +++ b/compiler/testData/codegen/box/enum/inclassobj.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB fun box() = if(Context.operatingSystemType == Context.Companion.OsType.OTHER) "OK" else "fail" public class Context diff --git a/compiler/testData/codegen/box/enum/initEntriesInCompanionObject.kt b/compiler/testData/codegen/box/enum/initEntriesInCompanionObject.kt index 876963fb292..c902d72a3ba 100644 --- a/compiler/testData/codegen/box/enum/initEntriesInCompanionObject.kt +++ b/compiler/testData/codegen/box/enum/initEntriesInCompanionObject.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // IGNORE_BACKEND: JS var l = "" diff --git a/compiler/testData/codegen/box/enum/initEntriesInCompanionObject2.kt b/compiler/testData/codegen/box/enum/initEntriesInCompanionObject2.kt index 7a8b0162e65..d06b4f8a7be 100644 --- a/compiler/testData/codegen/box/enum/initEntriesInCompanionObject2.kt +++ b/compiler/testData/codegen/box/enum/initEntriesInCompanionObject2.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // IGNORE_BACKEND: JS // IGNORE_BACKEND: WASM diff --git a/compiler/testData/codegen/box/enum/initEntriesInValueOf.kt b/compiler/testData/codegen/box/enum/initEntriesInValueOf.kt index 876963fb292..c902d72a3ba 100644 --- a/compiler/testData/codegen/box/enum/initEntriesInValueOf.kt +++ b/compiler/testData/codegen/box/enum/initEntriesInValueOf.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // IGNORE_BACKEND: JS var l = "" diff --git a/compiler/testData/codegen/box/enum/initEnumAfterObjectAccess.kt b/compiler/testData/codegen/box/enum/initEnumAfterObjectAccess.kt index 4426245fc4f..d72d1deb3d4 100644 --- a/compiler/testData/codegen/box/enum/initEnumAfterObjectAccess.kt +++ b/compiler/testData/codegen/box/enum/initEnumAfterObjectAccess.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // DONT_TARGET_EXACT_BACKEND: JS // DONT_TARGET_EXACT_BACKEND: JS_IR // DONT_TARGET_EXACT_BACKEND: JS_IR_ES6 diff --git a/compiler/testData/codegen/box/enum/inner.kt b/compiler/testData/codegen/box/enum/inner.kt index 01ef380fbc3..bf6699effdd 100644 --- a/compiler/testData/codegen/box/enum/inner.kt +++ b/compiler/testData/codegen/box/enum/inner.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB class A { enum class E { OK diff --git a/compiler/testData/codegen/box/enum/innerClassInEnumEntryClass.kt b/compiler/testData/codegen/box/enum/innerClassInEnumEntryClass.kt index 154e0a4539f..8871e425dba 100644 --- a/compiler/testData/codegen/box/enum/innerClassInEnumEntryClass.kt +++ b/compiler/testData/codegen/box/enum/innerClassInEnumEntryClass.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class A { X { val x = "OK" diff --git a/compiler/testData/codegen/box/enum/innerClassMethodInEnumEntryClass.kt b/compiler/testData/codegen/box/enum/innerClassMethodInEnumEntryClass.kt index 8e561ccd6d1..a65b55c6d8b 100644 --- a/compiler/testData/codegen/box/enum/innerClassMethodInEnumEntryClass.kt +++ b/compiler/testData/codegen/box/enum/innerClassMethodInEnumEntryClass.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class A { X { val x = "OK" diff --git a/compiler/testData/codegen/box/enum/innerClassMethodInEnumEntryClass2.kt b/compiler/testData/codegen/box/enum/innerClassMethodInEnumEntryClass2.kt index 38a1ffc04f6..ed67c413279 100644 --- a/compiler/testData/codegen/box/enum/innerClassMethodInEnumEntryClass2.kt +++ b/compiler/testData/codegen/box/enum/innerClassMethodInEnumEntryClass2.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class A { X { val x = "OK" diff --git a/compiler/testData/codegen/box/enum/innerWithExistingClassObject.kt b/compiler/testData/codegen/box/enum/innerWithExistingClassObject.kt index 139345cc14a..e3154efece2 100644 --- a/compiler/testData/codegen/box/enum/innerWithExistingClassObject.kt +++ b/compiler/testData/codegen/box/enum/innerWithExistingClassObject.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB class A { companion object {} enum class E { diff --git a/compiler/testData/codegen/box/enum/kt1119.kt b/compiler/testData/codegen/box/enum/kt1119.kt index 6445197faee..0bd2b8e625d 100644 --- a/compiler/testData/codegen/box/enum/kt1119.kt +++ b/compiler/testData/codegen/box/enum/kt1119.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class Direction() { NORTH { val someSpecialValue = "OK" diff --git a/compiler/testData/codegen/box/enum/kt18731.kt b/compiler/testData/codegen/box/enum/kt18731.kt index 465457e31bc..587b2043eed 100644 --- a/compiler/testData/codegen/box/enum/kt18731.kt +++ b/compiler/testData/codegen/box/enum/kt18731.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class Bar { ONE, TWO diff --git a/compiler/testData/codegen/box/enum/kt18731_2.kt b/compiler/testData/codegen/box/enum/kt18731_2.kt index cbba381aa00..354e9927e51 100644 --- a/compiler/testData/codegen/box/enum/kt18731_2.kt +++ b/compiler/testData/codegen/box/enum/kt18731_2.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // SKIP_DCE_DRIVEN enum class Bar { diff --git a/compiler/testData/codegen/box/enum/kt20651.kt b/compiler/testData/codegen/box/enum/kt20651.kt index 8845e4c6d48..745d9f2cc89 100644 --- a/compiler/testData/codegen/box/enum/kt20651.kt +++ b/compiler/testData/codegen/box/enum/kt20651.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class Test(val x: String, val closure1: () -> String) { FOO("O", { FOO.x }) { override val y: String = "K" diff --git a/compiler/testData/codegen/box/enum/kt20651_inlineLambda.kt b/compiler/testData/codegen/box/enum/kt20651_inlineLambda.kt index d1f12734575..1e5db2e4d65 100644 --- a/compiler/testData/codegen/box/enum/kt20651_inlineLambda.kt +++ b/compiler/testData/codegen/box/enum/kt20651_inlineLambda.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class Test(val x: String, val closure1: () -> String) { FOO("O", run { { FOO.x } }) { override val y: String = "K" diff --git a/compiler/testData/codegen/box/enum/kt20651a.kt b/compiler/testData/codegen/box/enum/kt20651a.kt index 56ad7c1adde..1ceb217e14d 100644 --- a/compiler/testData/codegen/box/enum/kt20651a.kt +++ b/compiler/testData/codegen/box/enum/kt20651a.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // SKIP_MANGLE_VERIFICATION enum class Foo( val x: String, diff --git a/compiler/testData/codegen/box/enum/kt20651b.kt b/compiler/testData/codegen/box/enum/kt20651b.kt index 3ea67f9574d..8abc29195f8 100644 --- a/compiler/testData/codegen/box/enum/kt20651b.kt +++ b/compiler/testData/codegen/box/enum/kt20651b.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // SKIP_MANGLE_VERIFICATION interface Callback { fun invoke(): String diff --git a/compiler/testData/codegen/box/enum/kt2350.kt b/compiler/testData/codegen/box/enum/kt2350.kt index d4a363062b3..0ba6ed68a69 100644 --- a/compiler/testData/codegen/box/enum/kt2350.kt +++ b/compiler/testData/codegen/box/enum/kt2350.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class A(val b: String) { E1("OK"){ override fun t() = b }; diff --git a/compiler/testData/codegen/box/enum/kt38996.kt b/compiler/testData/codegen/box/enum/kt38996.kt index 83f2c00dd40..d34a64770d1 100644 --- a/compiler/testData/codegen/box/enum/kt38996.kt +++ b/compiler/testData/codegen/box/enum/kt38996.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class E(val b: Boolean) { TRUE(1 == 1) } diff --git a/compiler/testData/codegen/box/enum/kt44744.kt b/compiler/testData/codegen/box/enum/kt44744.kt index 71f2ddb5a0f..0fec0820ee2 100644 --- a/compiler/testData/codegen/box/enum/kt44744.kt +++ b/compiler/testData/codegen/box/enum/kt44744.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class ContentType { PLAIN_TEXT { diff --git a/compiler/testData/codegen/box/enum/kt44744_innerClass.kt b/compiler/testData/codegen/box/enum/kt44744_innerClass.kt index 63fd4b49873..998c5678332 100644 --- a/compiler/testData/codegen/box/enum/kt44744_innerClass.kt +++ b/compiler/testData/codegen/box/enum/kt44744_innerClass.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB interface IFoo { fun foo(e: En): String } diff --git a/compiler/testData/codegen/box/enum/kt46605.kt b/compiler/testData/codegen/box/enum/kt46605.kt index fb275d0c164..dc753cafc1b 100644 --- a/compiler/testData/codegen/box/enum/kt46605.kt +++ b/compiler/testData/codegen/box/enum/kt46605.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB fun call(f: () -> Unit) { f() } diff --git a/compiler/testData/codegen/box/enum/kt7257.kt b/compiler/testData/codegen/box/enum/kt7257.kt index 78dca7e9610..55928cc3c27 100644 --- a/compiler/testData/codegen/box/enum/kt7257.kt +++ b/compiler/testData/codegen/box/enum/kt7257.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class X { B { val value2 = "K" diff --git a/compiler/testData/codegen/box/enum/kt7257_anonObjectInit.kt b/compiler/testData/codegen/box/enum/kt7257_anonObjectInit.kt index 2cc9963d5c6..ebd1f4b29ac 100644 --- a/compiler/testData/codegen/box/enum/kt7257_anonObjectInit.kt +++ b/compiler/testData/codegen/box/enum/kt7257_anonObjectInit.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class X { B { val value2 = "K" diff --git a/compiler/testData/codegen/box/enum/kt7257_anonObjectMethod.kt b/compiler/testData/codegen/box/enum/kt7257_anonObjectMethod.kt index 4f5e5ce5bda..11d3c385ade 100644 --- a/compiler/testData/codegen/box/enum/kt7257_anonObjectMethod.kt +++ b/compiler/testData/codegen/box/enum/kt7257_anonObjectMethod.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class X { B { val value2 = "K" diff --git a/compiler/testData/codegen/box/enum/kt7257_boundReference1.kt b/compiler/testData/codegen/box/enum/kt7257_boundReference1.kt index 071d5fef979..8f13d365b8d 100644 --- a/compiler/testData/codegen/box/enum/kt7257_boundReference1.kt +++ b/compiler/testData/codegen/box/enum/kt7257_boundReference1.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class X { B { diff --git a/compiler/testData/codegen/box/enum/kt7257_boundReference2.kt b/compiler/testData/codegen/box/enum/kt7257_boundReference2.kt index e34bc6403ba..e4bbf63f6b0 100644 --- a/compiler/testData/codegen/box/enum/kt7257_boundReference2.kt +++ b/compiler/testData/codegen/box/enum/kt7257_boundReference2.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class X { B { diff --git a/compiler/testData/codegen/box/enum/kt7257_boundReferenceWithImplicitReceiver.kt b/compiler/testData/codegen/box/enum/kt7257_boundReferenceWithImplicitReceiver.kt index 50948f805ff..14e7be26b50 100644 --- a/compiler/testData/codegen/box/enum/kt7257_boundReferenceWithImplicitReceiver.kt +++ b/compiler/testData/codegen/box/enum/kt7257_boundReferenceWithImplicitReceiver.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class X { B { override val value = "OK" diff --git a/compiler/testData/codegen/box/enum/kt7257_explicitReceiver.kt b/compiler/testData/codegen/box/enum/kt7257_explicitReceiver.kt index 44c3183a50a..eb5dd9c8a98 100644 --- a/compiler/testData/codegen/box/enum/kt7257_explicitReceiver.kt +++ b/compiler/testData/codegen/box/enum/kt7257_explicitReceiver.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class X { B { override val value2 = "K" diff --git a/compiler/testData/codegen/box/enum/kt7257_fullyQualifiedReceiver.kt b/compiler/testData/codegen/box/enum/kt7257_fullyQualifiedReceiver.kt index 384e2daa331..75c8f3916a5 100644 --- a/compiler/testData/codegen/box/enum/kt7257_fullyQualifiedReceiver.kt +++ b/compiler/testData/codegen/box/enum/kt7257_fullyQualifiedReceiver.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class X { B { override val value2 = "K" diff --git a/compiler/testData/codegen/box/enum/kt7257_namedLocalFun.kt b/compiler/testData/codegen/box/enum/kt7257_namedLocalFun.kt index 5438d725fba..2d3d329ca9a 100644 --- a/compiler/testData/codegen/box/enum/kt7257_namedLocalFun.kt +++ b/compiler/testData/codegen/box/enum/kt7257_namedLocalFun.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class X { B { val value2 = "K" diff --git a/compiler/testData/codegen/box/enum/kt7257_notInline.kt b/compiler/testData/codegen/box/enum/kt7257_notInline.kt index 3851efb5669..24fa65d584a 100644 --- a/compiler/testData/codegen/box/enum/kt7257_notInline.kt +++ b/compiler/testData/codegen/box/enum/kt7257_notInline.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB fun T.letNoInline(fn: (T) -> R) = fn(this) diff --git a/compiler/testData/codegen/box/enum/kt9711.kt b/compiler/testData/codegen/box/enum/kt9711.kt index 096316ed24b..f531e02701e 100644 --- a/compiler/testData/codegen/box/enum/kt9711.kt +++ b/compiler/testData/codegen/box/enum/kt9711.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class X { B { diff --git a/compiler/testData/codegen/box/enum/kt9711_2.kt b/compiler/testData/codegen/box/enum/kt9711_2.kt index dcad91e092b..1a3473f5d6c 100644 --- a/compiler/testData/codegen/box/enum/kt9711_2.kt +++ b/compiler/testData/codegen/box/enum/kt9711_2.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class IssueState { FIXED { diff --git a/compiler/testData/codegen/box/enum/manyDefaultParameters.kt b/compiler/testData/codegen/box/enum/manyDefaultParameters.kt index a094da96f27..f7c39bfa5b4 100644 --- a/compiler/testData/codegen/box/enum/manyDefaultParameters.kt +++ b/compiler/testData/codegen/box/enum/manyDefaultParameters.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class ClassTemplate( // var bug: Int = 1, var code: Int, diff --git a/compiler/testData/codegen/box/enum/ordinal.kt b/compiler/testData/codegen/box/enum/ordinal.kt index d66c3e0ae4e..b301a8554a5 100644 --- a/compiler/testData/codegen/box/enum/ordinal.kt +++ b/compiler/testData/codegen/box/enum/ordinal.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class State { _0, _1, diff --git a/compiler/testData/codegen/box/enum/overloadedEnumValues.kt b/compiler/testData/codegen/box/enum/overloadedEnumValues.kt index 0f0a39b5905..8270c58d627 100644 --- a/compiler/testData/codegen/box/enum/overloadedEnumValues.kt +++ b/compiler/testData/codegen/box/enum/overloadedEnumValues.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class E { A; diff --git a/compiler/testData/codegen/box/enum/refToThis.kt b/compiler/testData/codegen/box/enum/refToThis.kt index 77da3bf2133..0fad02720f3 100644 --- a/compiler/testData/codegen/box/enum/refToThis.kt +++ b/compiler/testData/codegen/box/enum/refToThis.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class Enum { ENUM_VALUE { override fun test() = ENUM_VALUE diff --git a/compiler/testData/codegen/box/enum/simple.kt b/compiler/testData/codegen/box/enum/simple.kt index ed48d29a5d9..89e10604050 100644 --- a/compiler/testData/codegen/box/enum/simple.kt +++ b/compiler/testData/codegen/box/enum/simple.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class Season { WINTER, SPRING, diff --git a/compiler/testData/codegen/box/enum/superCallInEnumLiteral.kt b/compiler/testData/codegen/box/enum/superCallInEnumLiteral.kt index 11507d9d147..4aa10063b0a 100644 --- a/compiler/testData/codegen/box/enum/superCallInEnumLiteral.kt +++ b/compiler/testData/codegen/box/enum/superCallInEnumLiteral.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB package test fun box() = E.E1.f() + E.E2.f() diff --git a/compiler/testData/codegen/box/enum/toString.kt b/compiler/testData/codegen/box/enum/toString.kt index b4890365b12..cf64259927d 100644 --- a/compiler/testData/codegen/box/enum/toString.kt +++ b/compiler/testData/codegen/box/enum/toString.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class State { O, K diff --git a/compiler/testData/codegen/box/enum/valueof.kt b/compiler/testData/codegen/box/enum/valueof.kt index f6f7f09c8c0..f8d4432331d 100644 --- a/compiler/testData/codegen/box/enum/valueof.kt +++ b/compiler/testData/codegen/box/enum/valueof.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class Color { RED, diff --git a/compiler/testData/codegen/box/enum/whenInObject.kt b/compiler/testData/codegen/box/enum/whenInObject.kt index 39234df7d84..2536f9e1b2b 100644 --- a/compiler/testData/codegen/box/enum/whenInObject.kt +++ b/compiler/testData/codegen/box/enum/whenInObject.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class E { OK, NOT_OK } diff --git a/compiler/testData/codegen/box/innerNested/nestedEnumConstant.kt b/compiler/testData/codegen/box/innerNested/nestedEnumConstant.kt index d8ae583f3d5..e41168b31d8 100644 --- a/compiler/testData/codegen/box/innerNested/nestedEnumConstant.kt +++ b/compiler/testData/codegen/box/innerNested/nestedEnumConstant.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB class Outer { enum class Nested { O, diff --git a/compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/specialFunctions/enumValueOf.kt b/compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/specialFunctions/enumValueOf.kt index 077b1c01666..5ce0cb5949d 100644 --- a/compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/specialFunctions/enumValueOf.kt +++ b/compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/specialFunctions/enumValueOf.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // TARGET_BACKEND: JVM // JVM_TARGET: 1.8 // SAM_CONVERSIONS: INDY diff --git a/compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/specialFunctions/enumValues.kt b/compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/specialFunctions/enumValues.kt index b5073ca13be..78a58203a27 100644 --- a/compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/specialFunctions/enumValues.kt +++ b/compiler/testData/codegen/box/invokedynamic/sam/functionRefToJavaInterface/specialFunctions/enumValues.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // TARGET_BACKEND: JVM // JVM_TARGET: 1.8 // SAM_CONVERSIONS: INDY diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/kt53480.kt b/compiler/testData/codegen/box/involvesIrInterpreter/kt53480.kt index 7029e4e2fcf..eb81cfb40d2 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/kt53480.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/kt53480.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // TARGET_BACKEND: JVM_IR // FILE: J.java public class J { diff --git a/compiler/testData/codegen/box/ir/privateSignatures/enumEntryArguments.kt b/compiler/testData/codegen/box/ir/privateSignatures/enumEntryArguments.kt index 256e5460977..07d83ea5a1f 100644 --- a/compiler/testData/codegen/box/ir/privateSignatures/enumEntryArguments.kt +++ b/compiler/testData/codegen/box/ir/privateSignatures/enumEntryArguments.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // SKIP_MANGLE_VERIFICATION // MODULE: lib diff --git a/compiler/testData/codegen/box/ir/serializationRegressions/innerClassInEnumEntryClass.kt b/compiler/testData/codegen/box/ir/serializationRegressions/innerClassInEnumEntryClass.kt index af6389de744..9581c370660 100644 --- a/compiler/testData/codegen/box/ir/serializationRegressions/innerClassInEnumEntryClass.kt +++ b/compiler/testData/codegen/box/ir/serializationRegressions/innerClassInEnumEntryClass.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // MODULE: lib // FILE: lib.kt diff --git a/compiler/testData/codegen/box/multiplatform/defaultArguments/nestedEnumEntryValue.kt b/compiler/testData/codegen/box/multiplatform/defaultArguments/nestedEnumEntryValue.kt index 50d5411a11e..d5e674eaff6 100644 --- a/compiler/testData/codegen/box/multiplatform/defaultArguments/nestedEnumEntryValue.kt +++ b/compiler/testData/codegen/box/multiplatform/defaultArguments/nestedEnumEntryValue.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // IGNORE_BACKEND: JS_IR, JS_IR_ES6, WASM // JS IR & Wasm: https://youtrack.jetbrains.com/issue/KT-51225 // IGNORE_BACKEND_K2: JVM_IR, NATIVE diff --git a/compiler/testData/codegen/box/multiplatform/exhaustiveness/commonEnum.kt b/compiler/testData/codegen/box/multiplatform/exhaustiveness/commonEnum.kt index cc77796e38f..06fe0fbe5a8 100644 --- a/compiler/testData/codegen/box/multiplatform/exhaustiveness/commonEnum.kt +++ b/compiler/testData/codegen/box/multiplatform/exhaustiveness/commonEnum.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // TARGET_BACKEND: JVM // !LANGUAGE: +MultiPlatformProjects // ISSUE: KT-20306 diff --git a/compiler/testData/codegen/box/multiplatform/multiModule/enumEntryNameCall.kt b/compiler/testData/codegen/box/multiplatform/multiModule/enumEntryNameCall.kt index 690a913299a..fa84eda4658 100644 --- a/compiler/testData/codegen/box/multiplatform/multiModule/enumEntryNameCall.kt +++ b/compiler/testData/codegen/box/multiplatform/multiModule/enumEntryNameCall.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // TARGET_BACKEND: JVM // !LANGUAGE: +MultiPlatformProjects diff --git a/compiler/testData/codegen/box/multiplatform/starImportOfExpectEnumWithActualTypeAlias.kt b/compiler/testData/codegen/box/multiplatform/starImportOfExpectEnumWithActualTypeAlias.kt index e9d1b2a3bd3..fde5fdfe964 100644 --- a/compiler/testData/codegen/box/multiplatform/starImportOfExpectEnumWithActualTypeAlias.kt +++ b/compiler/testData/codegen/box/multiplatform/starImportOfExpectEnumWithActualTypeAlias.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // !LANGUAGE: +MultiPlatformProjects // IGNORE_BACKEND: JS // IGNORE_BACKEND: JS_IR diff --git a/compiler/testData/codegen/box/objects/kt1186.kt b/compiler/testData/codegen/box/objects/kt1186.kt index 6100f7092fa..327cd1a5ae4 100644 --- a/compiler/testData/codegen/box/objects/kt1186.kt +++ b/compiler/testData/codegen/box/objects/kt1186.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class Color(val rgb : Int) { RED(0xFF0000), GREEN(0x00FF00), diff --git a/compiler/testData/codegen/box/objects/kt694.kt b/compiler/testData/codegen/box/objects/kt694.kt index 945e1298489..ca7cd912cf1 100644 --- a/compiler/testData/codegen/box/objects/kt694.kt +++ b/compiler/testData/codegen/box/objects/kt694.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class Test { A, B, diff --git a/compiler/testData/codegen/box/objects/substitutionFunctionFromSuper.kt b/compiler/testData/codegen/box/objects/substitutionFunctionFromSuper.kt index ff7785b0e0c..87186e1b7fa 100644 --- a/compiler/testData/codegen/box/objects/substitutionFunctionFromSuper.kt +++ b/compiler/testData/codegen/box/objects/substitutionFunctionFromSuper.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // KT-44054 enum class Enum { diff --git a/compiler/testData/codegen/box/objects/useAnonymousObjectFunction.kt b/compiler/testData/codegen/box/objects/useAnonymousObjectFunction.kt index 2a4a870eed2..2b1eff924f2 100644 --- a/compiler/testData/codegen/box/objects/useAnonymousObjectFunction.kt +++ b/compiler/testData/codegen/box/objects/useAnonymousObjectFunction.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // KT-44050 enum class Enum { diff --git a/compiler/testData/codegen/box/package/privateMembersInImportList.kt b/compiler/testData/codegen/box/package/privateMembersInImportList.kt index e7009753efa..201bcffd2a3 100644 --- a/compiler/testData/codegen/box/package/privateMembersInImportList.kt +++ b/compiler/testData/codegen/box/package/privateMembersInImportList.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB package test import test.C.E1 diff --git a/compiler/testData/codegen/box/secondaryConstructors/enums.kt b/compiler/testData/codegen/box/secondaryConstructors/enums.kt index acc6fdcdf5b..f637015fcdc 100644 --- a/compiler/testData/codegen/box/secondaryConstructors/enums.kt +++ b/compiler/testData/codegen/box/secondaryConstructors/enums.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // IGNORE_BACKEND_K2: JS_IR, NATIVE enum class A1(val prop1: String) { diff --git a/compiler/testData/codegen/box/specialBuiltins/enumAsOrdinaled.kt b/compiler/testData/codegen/box/specialBuiltins/enumAsOrdinaled.kt index 434c332237d..e0957db6137 100644 --- a/compiler/testData/codegen/box/specialBuiltins/enumAsOrdinaled.kt +++ b/compiler/testData/codegen/box/specialBuiltins/enumAsOrdinaled.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB interface Ordinaled { val ordinal: Int } diff --git a/compiler/testData/codegen/box/specialBuiltins/valuesInsideEnum.kt b/compiler/testData/codegen/box/specialBuiltins/valuesInsideEnum.kt index ee008bfcf82..627ae53dd22 100644 --- a/compiler/testData/codegen/box/specialBuiltins/valuesInsideEnum.kt +++ b/compiler/testData/codegen/box/specialBuiltins/valuesInsideEnum.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class Variants { O, K; companion object { diff --git a/compiler/testData/codegen/box/typealias/enumEntryQualifier.kt b/compiler/testData/codegen/box/typealias/enumEntryQualifier.kt index 19c383aaed0..bbadfdb2f51 100644 --- a/compiler/testData/codegen/box/typealias/enumEntryQualifier.kt +++ b/compiler/testData/codegen/box/typealias/enumEntryQualifier.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class MyEnum { O; companion object { diff --git a/compiler/testData/codegen/box/when/emptyWhen.kt b/compiler/testData/codegen/box/when/emptyWhen.kt index 58fbad659db..db56fffbb64 100644 --- a/compiler/testData/codegen/box/when/emptyWhen.kt +++ b/compiler/testData/codegen/box/when/emptyWhen.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class A { X1, X2 } fun box(): String { diff --git a/compiler/testData/codegen/box/when/enumOptimization/differentEnumClasses.kt b/compiler/testData/codegen/box/when/enumOptimization/differentEnumClasses.kt index 867bc2f5b7a..4e77a209d66 100644 --- a/compiler/testData/codegen/box/when/enumOptimization/differentEnumClasses.kt +++ b/compiler/testData/codegen/box/when/enumOptimization/differentEnumClasses.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // !LANGUAGE: -ProhibitComparisonOfIncompatibleEnums enum class A { diff --git a/compiler/testData/codegen/box/when/enumOptimization/differentEnumClasses2.kt b/compiler/testData/codegen/box/when/enumOptimization/differentEnumClasses2.kt index deffe8ae56f..ed49a037750 100644 --- a/compiler/testData/codegen/box/when/enumOptimization/differentEnumClasses2.kt +++ b/compiler/testData/codegen/box/when/enumOptimization/differentEnumClasses2.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // !LANGUAGE: -ProhibitComparisonOfIncompatibleEnums enum class A { diff --git a/compiler/testData/codegen/box/when/enumOptimization/functionLiteralInTopLevel.kt b/compiler/testData/codegen/box/when/enumOptimization/functionLiteralInTopLevel.kt index 75b8e707d78..160289ef78c 100644 --- a/compiler/testData/codegen/box/when/enumOptimization/functionLiteralInTopLevel.kt +++ b/compiler/testData/codegen/box/when/enumOptimization/functionLiteralInTopLevel.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // CHECK_CASES_COUNT: function=box$lambda count=0 // CHECK_IF_COUNT: function=box$lambda count=1 TARGET_BACKENDS=JS // CHECK_IF_COUNT: function=box$lambda count=0 IGNORED_BACKENDS=JS diff --git a/compiler/testData/codegen/box/when/enumOptimization/kt14597.kt b/compiler/testData/codegen/box/when/enumOptimization/kt14597.kt index 7af0d40883e..629e0ea90c2 100644 --- a/compiler/testData/codegen/box/when/enumOptimization/kt14597.kt +++ b/compiler/testData/codegen/box/when/enumOptimization/kt14597.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // CHECK_CASES_COUNT: function=box count=6 // CHECK_IF_COUNT: function=box count=1 diff --git a/compiler/testData/codegen/box/when/enumOptimization/kt14597_full.kt b/compiler/testData/codegen/box/when/enumOptimization/kt14597_full.kt index 2926f787c9e..69f974c6db6 100644 --- a/compiler/testData/codegen/box/when/enumOptimization/kt14597_full.kt +++ b/compiler/testData/codegen/box/when/enumOptimization/kt14597_full.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // CHECK_CASES_COUNT: function=box count=18 // CHECK_IF_COUNT: function=box count=3 diff --git a/compiler/testData/codegen/box/when/enumOptimization/kt14802.kt b/compiler/testData/codegen/box/when/enumOptimization/kt14802.kt index 5818daa933a..b1772e3db5d 100644 --- a/compiler/testData/codegen/box/when/enumOptimization/kt14802.kt +++ b/compiler/testData/codegen/box/when/enumOptimization/kt14802.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // IGNORE_BACKEND_K2: JS_IR // CHECK_CASES_COUNT: function=crash count=2 TARGET_BACKENDS=JS // CHECK_CASES_COUNT: function=crash count=0 IGNORED_BACKENDS=JS diff --git a/compiler/testData/codegen/box/when/enumOptimization/kt15806.kt b/compiler/testData/codegen/box/when/enumOptimization/kt15806.kt index cde1795146d..e931e744630 100644 --- a/compiler/testData/codegen/box/when/enumOptimization/kt15806.kt +++ b/compiler/testData/codegen/box/when/enumOptimization/kt15806.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // IGNORE_BACKEND_K2: JS_IR // CHECK_CASES_COUNT: function=doTheThing count=2 TARGET_BACKENDS=JS // CHECK_CASES_COUNT: function=doTheThing count=0 IGNORED_BACKENDS=JS diff --git a/compiler/testData/codegen/box/when/enumOptimization/kt50258.kt b/compiler/testData/codegen/box/when/enumOptimization/kt50258.kt index adaaf227157..a6adef17325 100644 --- a/compiler/testData/codegen/box/when/enumOptimization/kt50258.kt +++ b/compiler/testData/codegen/box/when/enumOptimization/kt50258.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class MyEnum { First, Second diff --git a/compiler/testData/codegen/box/when/enumOptimization/nestedWhenInCondition.kt b/compiler/testData/codegen/box/when/enumOptimization/nestedWhenInCondition.kt index d27345bad6c..f0414b77251 100644 --- a/compiler/testData/codegen/box/when/enumOptimization/nestedWhenInCondition.kt +++ b/compiler/testData/codegen/box/when/enumOptimization/nestedWhenInCondition.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class ABCD { A, B, C, D } diff --git a/compiler/testData/codegen/box/when/enumOptimization/nestedWhenInResult.kt b/compiler/testData/codegen/box/when/enumOptimization/nestedWhenInResult.kt index ef82ff0e03d..9ad6924f59f 100644 --- a/compiler/testData/codegen/box/when/enumOptimization/nestedWhenInResult.kt +++ b/compiler/testData/codegen/box/when/enumOptimization/nestedWhenInResult.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class ABCD { A, B, C, D } diff --git a/compiler/testData/codegen/box/when/enumOptimization/nonConstantEnum.kt b/compiler/testData/codegen/box/when/enumOptimization/nonConstantEnum.kt index f613b0c7f4f..292d8b2b864 100644 --- a/compiler/testData/codegen/box/when/enumOptimization/nonConstantEnum.kt +++ b/compiler/testData/codegen/box/when/enumOptimization/nonConstantEnum.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // CHECK_CASES_COUNT: function=box count=0 // CHECK_IF_COUNT: function=box count=1 diff --git a/compiler/testData/codegen/box/when/enumOptimization/notAllEntriesAreConstants.kt b/compiler/testData/codegen/box/when/enumOptimization/notAllEntriesAreConstants.kt index ab28ac66b88..53efa027147 100644 --- a/compiler/testData/codegen/box/when/enumOptimization/notAllEntriesAreConstants.kt +++ b/compiler/testData/codegen/box/when/enumOptimization/notAllEntriesAreConstants.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // TARGET_BACKEND: JVM_IR enum class E { diff --git a/compiler/testData/codegen/box/when/enumOptimization/nullIsTheFirstEntry.kt b/compiler/testData/codegen/box/when/enumOptimization/nullIsTheFirstEntry.kt index 74908190cdc..2f945d158d2 100644 --- a/compiler/testData/codegen/box/when/enumOptimization/nullIsTheFirstEntry.kt +++ b/compiler/testData/codegen/box/when/enumOptimization/nullIsTheFirstEntry.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class E { A, B; } diff --git a/compiler/testData/codegen/box/when/enumOptimization/nullableEnum.kt b/compiler/testData/codegen/box/when/enumOptimization/nullableEnum.kt index 7707e796750..b60c7fdfebe 100644 --- a/compiler/testData/codegen/box/when/enumOptimization/nullableEnum.kt +++ b/compiler/testData/codegen/box/when/enumOptimization/nullableEnum.kt @@ -1,5 +1,6 @@ -// CHECK_CASES_COUNT: function=test count=0 TARGET_BACKENDS=JS -// CHECK_CASES_COUNT: function=test count=3 IGNORED_BACKENDS=JS +// WITH_STDLIB +// CHECK_CASES_COUNT: function=test count=0 TARGET_BACKENDS=JS;JS_IR;JS_IR_ES6 +// CHECK_CASES_COUNT: function=test count=3 IGNORED_BACKENDS=JS;JS_IR;JS_IR_ES6 // CHECK_IF_COUNT: function=test count=3 TARGET_BACKENDS=JS // CHECK_IF_COUNT: function=test count=0 IGNORED_BACKENDS=JS diff --git a/compiler/testData/codegen/box/when/exhaustiveBreakContinue.kt b/compiler/testData/codegen/box/when/exhaustiveBreakContinue.kt index 69c959e13cb..0c75041c820 100644 --- a/compiler/testData/codegen/box/when/exhaustiveBreakContinue.kt +++ b/compiler/testData/codegen/box/when/exhaustiveBreakContinue.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class Color { RED, GREEN, BLUE } fun foo(arr: Array): Color { diff --git a/compiler/testData/codegen/box/when/exhaustiveWhenInitialization.kt b/compiler/testData/codegen/box/when/exhaustiveWhenInitialization.kt index ccf67614e6c..32f2327df81 100644 --- a/compiler/testData/codegen/box/when/exhaustiveWhenInitialization.kt +++ b/compiler/testData/codegen/box/when/exhaustiveWhenInitialization.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class A { V } fun box(): String { diff --git a/compiler/testData/codegen/box/when/exhaustiveWhenReturn.kt b/compiler/testData/codegen/box/when/exhaustiveWhenReturn.kt index 6b3b7658cc2..2ca79543f76 100644 --- a/compiler/testData/codegen/box/when/exhaustiveWhenReturn.kt +++ b/compiler/testData/codegen/box/when/exhaustiveWhenReturn.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class A { V } fun box(): String { diff --git a/compiler/testData/codegen/box/when/kt47475.kt b/compiler/testData/codegen/box/when/kt47475.kt index 569e7ab63f9..2fd7208b3a2 100644 --- a/compiler/testData/codegen/box/when/kt47475.kt +++ b/compiler/testData/codegen/box/when/kt47475.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // TARGET_BACKEND: JVM // CHECK_BYTECODE_TEXT diff --git a/compiler/testData/codegen/box/when/noElseExhaustive.kt b/compiler/testData/codegen/box/when/noElseExhaustive.kt index e02125f19c8..f9cc2cb0a4f 100644 --- a/compiler/testData/codegen/box/when/noElseExhaustive.kt +++ b/compiler/testData/codegen/box/when/noElseExhaustive.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class En { A, B diff --git a/compiler/testData/codegen/box/when/noElseExhaustiveStatement.kt b/compiler/testData/codegen/box/when/noElseExhaustiveStatement.kt index da79d180335..071481ed769 100644 --- a/compiler/testData/codegen/box/when/noElseExhaustiveStatement.kt +++ b/compiler/testData/codegen/box/when/noElseExhaustiveStatement.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class En { A, B diff --git a/compiler/testData/codegen/box/when/noElseExhaustiveUnitExpected.kt b/compiler/testData/codegen/box/when/noElseExhaustiveUnitExpected.kt index 2c69069abac..dd4dd981212 100644 --- a/compiler/testData/codegen/box/when/noElseExhaustiveUnitExpected.kt +++ b/compiler/testData/codegen/box/when/noElseExhaustiveUnitExpected.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class En { A, B diff --git a/compiler/testData/codegen/box/when/switchOptimizationMultipleMixedConditions.kt b/compiler/testData/codegen/box/when/switchOptimizationMultipleMixedConditions.kt index d600955f52a..7ebd6fe6c30 100644 --- a/compiler/testData/codegen/box/when/switchOptimizationMultipleMixedConditions.kt +++ b/compiler/testData/codegen/box/when/switchOptimizationMultipleMixedConditions.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB private fun parse(text: String) = when (text) { Numbers.One.name, "one", "1" -> 1 Numbers.Two.name, "two", "2" -> 2 diff --git a/compiler/testData/codegen/box/when/whenSubjectVariable/kt27161.kt b/compiler/testData/codegen/box/when/whenSubjectVariable/kt27161.kt index 18862bde022..40795e16ea4 100644 --- a/compiler/testData/codegen/box/when/whenSubjectVariable/kt27161.kt +++ b/compiler/testData/codegen/box/when/whenSubjectVariable/kt27161.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class Test { A, B, OTHER } diff --git a/compiler/testData/codegen/box/when/whenSubjectVariable/kt27161_nested.kt b/compiler/testData/codegen/box/when/whenSubjectVariable/kt27161_nested.kt index e75b6085120..5da8a4b9462 100644 --- a/compiler/testData/codegen/box/when/whenSubjectVariable/kt27161_nested.kt +++ b/compiler/testData/codegen/box/when/whenSubjectVariable/kt27161_nested.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class Test { A, B, OTHER } diff --git a/compiler/testData/codegen/box/when/whenSubjectVariable/kt27161_nested2.kt b/compiler/testData/codegen/box/when/whenSubjectVariable/kt27161_nested2.kt index f0dbde680a1..b6a1bdb6938 100644 --- a/compiler/testData/codegen/box/when/whenSubjectVariable/kt27161_nested2.kt +++ b/compiler/testData/codegen/box/when/whenSubjectVariable/kt27161_nested2.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class Test { A, B, OTHER } diff --git a/compiler/testData/codegen/boxInline/anonymousObject/enumWhen/callSite.kt b/compiler/testData/codegen/boxInline/anonymousObject/enumWhen/callSite.kt index 3539bbfb478..4fd67afac9f 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/enumWhen/callSite.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/enumWhen/callSite.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // NO_CHECK_LAMBDA_INLINING // FILE: 1.kt diff --git a/compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSite.kt b/compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSite.kt index e5942e3987e..a47f4ecd576 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSite.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSite.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // FILE: 1.kt package test diff --git a/compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappings.kt b/compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappings.kt index 7e01061e0df..0b545eaced0 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappings.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappings.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // FILE: 1.kt package test diff --git a/compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappingsDifOrder.kt b/compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappingsDifOrder.kt index a54536a0b2f..c6800dd257d 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappingsDifOrder.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappingsDifOrder.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // FILE: 1.kt package test diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt index fefcc854cbc..8a926d5411e 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // FILE: 1.kt package test diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.kt index 97ff7ccdaeb..c774cd11911 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // FILE: 1.kt package test diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.kt index 0b168a75dbe..5c104972159 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // FILE: 1.kt package test diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.kt index 304d0c1b23b..8357476d1eb 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // FILE: 1.kt package test diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.kt index 583f141128c..18ade4ee7ed 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // FILE: 1.kt package test diff --git a/compiler/testData/codegen/boxInline/private/nestedInPrivateClass2.kt b/compiler/testData/codegen/boxInline/private/nestedInPrivateClass2.kt index ef3bcc4c76e..d3130957f5c 100644 --- a/compiler/testData/codegen/boxInline/private/nestedInPrivateClass2.kt +++ b/compiler/testData/codegen/boxInline/private/nestedInPrivateClass2.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // FILE: 1.kt package test diff --git a/compiler/testData/codegen/boxInline/simple/simpleEnum.kt b/compiler/testData/codegen/boxInline/simple/simpleEnum.kt index 2c775f9ea5a..faa9cd12f5e 100644 --- a/compiler/testData/codegen/boxInline/simple/simpleEnum.kt +++ b/compiler/testData/codegen/boxInline/simple/simpleEnum.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // FILE: 1.kt package test diff --git a/compiler/testData/codegen/bytecodeListing/enum.ir.txt b/compiler/testData/codegen/bytecodeListing/enum.ir.txt index 6fe72f22b86..463c257af56 100644 --- a/compiler/testData/codegen/bytecodeListing/enum.ir.txt +++ b/compiler/testData/codegen/bytecodeListing/enum.ir.txt @@ -16,6 +16,7 @@ public final enum class SimpleEnum { private synthetic final static method $values(): SimpleEnum[] static method (): void private method (p0: java.lang.String, p1: int): void + public static @org.jetbrains.annotations.NotNull method getEntries(): kotlin.enums.EnumEntries public static method valueOf(p0: java.lang.String): SimpleEnum public static method values(): SimpleEnum[] } @@ -31,6 +32,7 @@ public final enum class WithAnnotations { private synthetic final static method $values(): WithAnnotations[] static method (): void private method (p0: java.lang.String, p1: int): void + public static @org.jetbrains.annotations.NotNull method getEntries(): kotlin.enums.EnumEntries public static method valueOf(p0: java.lang.String): WithAnnotations public static method values(): WithAnnotations[] } @@ -48,6 +50,7 @@ public final enum class WithConstructor { private synthetic final static method $values(): WithConstructor[] static method (): void private method (p0: java.lang.String, p1: int, p2: java.lang.String): void + public static @org.jetbrains.annotations.NotNull method getEntries(): kotlin.enums.EnumEntries public final @org.jetbrains.annotations.NotNull method getX(): java.lang.String public static method valueOf(p0: java.lang.String): WithConstructor public static method values(): WithConstructor[] @@ -74,6 +77,7 @@ public abstract enum class WithEntryClass { private method (p0: java.lang.String, p1: int): void public synthetic method (p0: java.lang.String, p1: int, p2: kotlin.jvm.internal.DefaultConstructorMarker): void public abstract method foo(): void + public static @org.jetbrains.annotations.NotNull method getEntries(): kotlin.enums.EnumEntries public static method valueOf(p0: java.lang.String): WithEntryClass public static method values(): WithEntryClass[] } diff --git a/compiler/testData/codegen/bytecodeListing/enum.kt b/compiler/testData/codegen/bytecodeListing/enum.kt index a193aa6cfd4..c20691add9a 100644 --- a/compiler/testData/codegen/bytecodeListing/enum.kt +++ b/compiler/testData/codegen/bytecodeListing/enum.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class SimpleEnum { A, B, C } diff --git a/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassTypeParametersInConstructor.ir.txt b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassTypeParametersInConstructor.ir.txt index 95028a19009..f269102ded8 100644 --- a/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassTypeParametersInConstructor.ir.txt +++ b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassTypeParametersInConstructor.ir.txt @@ -38,6 +38,7 @@ public final enum class TestEnum { private synthetic final static method $values(): TestEnum[] static method (): void private method (p0: java.lang.String, p1: int, p2: int): void + public static @org.jetbrains.annotations.NotNull method getEntries(): kotlin.enums.EnumEntries public final method getZ-a_XrcN0(): int public static method valueOf(p0: java.lang.String): TestEnum public static method values(): TestEnum[] diff --git a/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassTypeParametersInConstructor.kt b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassTypeParametersInConstructor.kt index c8f0b7ffcba..6b0f6b218cd 100644 --- a/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassTypeParametersInConstructor.kt +++ b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassTypeParametersInConstructor.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // !LANGUAGE: +InlineClasses inline class Z(val x: Int) diff --git a/compiler/testData/codegen/bytecodeListing/kt55769.ir.txt b/compiler/testData/codegen/bytecodeListing/kt55769.ir.txt index 32d3a7a1f46..852d89e239d 100644 --- a/compiler/testData/codegen/bytecodeListing/kt55769.ir.txt +++ b/compiler/testData/codegen/bytecodeListing/kt55769.ir.txt @@ -11,6 +11,7 @@ public final enum class A$B$C { private method (p0: java.lang.String, p1: int): void public static method values(): A$B$C[] public static method valueOf(p0: java.lang.String): A$B$C + public static @org.jetbrains.annotations.NotNull method getEntries(): kotlin.enums.EnumEntries private synthetic final static method $values(): A$B$C[] private synthetic final static method $entries(): A$B$C[] static method (): void diff --git a/compiler/testData/codegen/bytecodeListing/kt55769.kt b/compiler/testData/codegen/bytecodeListing/kt55769.kt index d9533054e89..4329a326bc4 100644 --- a/compiler/testData/codegen/bytecodeListing/kt55769.kt +++ b/compiler/testData/codegen/bytecodeListing/kt55769.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // DONT_SORT_DECLARATIONS class Main { diff --git a/compiler/testData/codegen/script/kt20707.kts b/compiler/testData/codegen/script/kt20707.kts index 3ddef76bccc..cb166b4839e 100644 --- a/compiler/testData/codegen/script/kt20707.kts +++ b/compiler/testData/codegen/script/kt20707.kts @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class Build { Debug, Release } fun applySomething(build: Build) = when (build) { diff --git a/compiler/testData/debug/stepping/enum.kt b/compiler/testData/debug/stepping/enum.kt index cb51df5f195..612a2324998 100644 --- a/compiler/testData/debug/stepping/enum.kt +++ b/compiler/testData/debug/stepping/enum.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // FILE: test.kt enum class E() { @@ -35,36 +36,36 @@ fun box() { // but not for the allocation of the object. // EXPECTATIONS JVM JVM_IR -// test.kt:22 box -// EXPECTATIONS JVM_IR -// test.kt:4 -// test.kt:5 -// EXPECTATIONS JVM JVM_IR -// test.kt:7 foo -// test.kt:9 foo -// test.kt:22 box // test.kt:23 box -// test.kt:15 // EXPECTATIONS JVM_IR -// test.kt:16 +// test.kt:5 +// test.kt:6 // EXPECTATIONS JVM JVM_IR -// test.kt:17 -// test.kt:16 +// test.kt:8 foo +// test.kt:10 foo +// test.kt:23 box // test.kt:24 box +// test.kt:16 +// EXPECTATIONS JVM_IR +// test.kt:17 +// EXPECTATIONS JVM JVM_IR +// test.kt:18 +// test.kt:17 +// test.kt:25 box // EXPECTATIONS JS_IR -// test.kt:22 box -// test.kt:11 -// test.kt:3 -// test.kt:11 -// test.kt:3 -// test.kt:22 box -// test.kt:9 foo -// test.kt:7 E$foo$lambda -// test.kt:15 E2_initEntries -// test.kt:14 -// test.kt:14 -// test.kt:17 E2_initEntries -// test.kt:14 -// test.kt:14 -// test.kt:24 box +// test.kt:23 box +// test.kt:12 +// test.kt:4 +// test.kt:12 +// test.kt:4 +// test.kt:23 box +// test.kt:10 foo +// test.kt:8 E$foo$lambda +// test.kt:16 E2_initEntries +// test.kt:15 +// test.kt:15 +// test.kt:18 E2_initEntries +// test.kt:15 +// test.kt:15 +// test.kt:25 box \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/finalMembersFromBuiltIns/enumMembers.fir.kt b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/finalMembersFromBuiltIns/enumMembers.fir.kt index 8bc20f758b1..979d87a8d7b 100644 --- a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/finalMembersFromBuiltIns/enumMembers.fir.kt +++ b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/finalMembersFromBuiltIns/enumMembers.fir.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class E { ENTRY; diff --git a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/finalMembersFromBuiltIns/enumMembers.kt b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/finalMembersFromBuiltIns/enumMembers.kt index d333d24e91d..47b2236be67 100644 --- a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/finalMembersFromBuiltIns/enumMembers.kt +++ b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/finalMembersFromBuiltIns/enumMembers.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class E { ENTRY; diff --git a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/finalMembersFromBuiltIns/enumMembers.txt b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/finalMembersFromBuiltIns/enumMembers.txt index f98ef97b7ca..3f7affbbc51 100644 --- a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/finalMembersFromBuiltIns/enumMembers.txt +++ b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/finalMembersFromBuiltIns/enumMembers.txt @@ -15,6 +15,7 @@ public final enum class E : kotlin.Enum { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String // Static members + public final /*synthesized*/ val entries: kotlin.enums.EnumEntries public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): E public final /*synthesized*/ fun values(): kotlin.Array } diff --git a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/enum.kt b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/enum.kt index 226d81bd119..a1150efa5e6 100644 --- a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/enum.kt +++ b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/enum.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // FIR_IDENTICAL // !DIAGNOSTICS: -UNUSED_PARAMETER enum class E { diff --git a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/enum.txt b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/enum.txt index 180a7d063b9..39631f48ed9 100644 --- a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/enum.txt +++ b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/enum.txt @@ -17,6 +17,7 @@ public final enum class E : kotlin.Enum { public final fun values(): kotlin.Array // Static members + public final /*synthesized*/ val entries: kotlin.enums.EnumEntries public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): E public final /*synthesized*/ fun values(): kotlin.Array } diff --git a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/synthesized/enumValuesValueOf.kt b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/synthesized/enumValuesValueOf.kt index 2e928695092..46e7003420e 100644 --- a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/synthesized/enumValuesValueOf.kt +++ b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/synthesized/enumValuesValueOf.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // FIR_IDENTICAL enum class A { A1, diff --git a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/synthesized/enumValuesValueOf.txt b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/synthesized/enumValuesValueOf.txt index b6e1baac0ae..6bf796092ee 100644 --- a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/synthesized/enumValuesValueOf.txt +++ b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/synthesized/enumValuesValueOf.txt @@ -21,6 +21,7 @@ public final enum class A : kotlin.Enum { public final fun values(/*0*/ x: kotlin.String): kotlin.String // Static members + public final /*synthesized*/ val entries: kotlin.enums.EnumEntries public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): A public final /*synthesized*/ fun values(): kotlin.Array } diff --git a/compiler/testData/diagnostics/testsWithJvmBackend/scripts/enumCapturesProperty.diag.txt b/compiler/testData/diagnostics/testsWithJvmBackend/scripts/enumCapturesProperty.diag.txt index 62735a9a13a..e60e8bd0571 100644 --- a/compiler/testData/diagnostics/testsWithJvmBackend/scripts/enumCapturesProperty.diag.txt +++ b/compiler/testData/diagnostics/testsWithJvmBackend/scripts/enumCapturesProperty.diag.txt @@ -1 +1 @@ -/enumCapturesProperty.kts:7:1: error: Enum class Bar captures the script class instance. Try to use class or anonymous object instead +/enumCapturesProperty.kts:8:1: error: Enum class Bar captures the script class instance. Try to use class or anonymous object instead \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithJvmBackend/scripts/enumCapturesProperty.kts b/compiler/testData/diagnostics/testsWithJvmBackend/scripts/enumCapturesProperty.kts index e2a40d9eb60..831daf44984 100644 --- a/compiler/testData/diagnostics/testsWithJvmBackend/scripts/enumCapturesProperty.kts +++ b/compiler/testData/diagnostics/testsWithJvmBackend/scripts/enumCapturesProperty.kts @@ -1,3 +1,4 @@ +// WITH_STDLIB // !RENDER_DIAGNOSTICS_FULL_TEXT // TARGET_BACKEND: JVM_IR diff --git a/compiler/testData/diagnostics/testsWithJvmBackend/scripts/enumCapturesProperty.txt b/compiler/testData/diagnostics/testsWithJvmBackend/scripts/enumCapturesProperty.txt index 926ab02355d..f06e696e377 100644 --- a/compiler/testData/diagnostics/testsWithJvmBackend/scripts/enumCapturesProperty.txt +++ b/compiler/testData/diagnostics/testsWithJvmBackend/scripts/enumCapturesProperty.txt @@ -24,6 +24,7 @@ public final class EnumCapturesProperty : kotlin.script.templates.standard.Scrip public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String // Static members + public final /*synthesized*/ val entries: kotlin.enums.EnumEntries public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): EnumCapturesProperty.Bar public final /*synthesized*/ fun values(): kotlin.Array } diff --git a/compiler/testData/diagnostics/testsWithJvmBackend/scripts/enumEntryCapturesProperty.diag.txt b/compiler/testData/diagnostics/testsWithJvmBackend/scripts/enumEntryCapturesProperty.diag.txt index 084a60c4588..dff88cf716a 100644 --- a/compiler/testData/diagnostics/testsWithJvmBackend/scripts/enumEntryCapturesProperty.diag.txt +++ b/compiler/testData/diagnostics/testsWithJvmBackend/scripts/enumEntryCapturesProperty.diag.txt @@ -1 +1 @@ -/enumEntryCapturesProperty.kts:7:1: error: Enum class Bar captures the script class instance. Try to use class or anonymous object instead +/enumEntryCapturesProperty.kts:8:1: error: Enum class Bar captures the script class instance. Try to use class or anonymous object instead \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithJvmBackend/scripts/enumEntryCapturesProperty.kts b/compiler/testData/diagnostics/testsWithJvmBackend/scripts/enumEntryCapturesProperty.kts index f65bdd94f61..b7ed654ae44 100644 --- a/compiler/testData/diagnostics/testsWithJvmBackend/scripts/enumEntryCapturesProperty.kts +++ b/compiler/testData/diagnostics/testsWithJvmBackend/scripts/enumEntryCapturesProperty.kts @@ -1,3 +1,4 @@ +// WITH_STDLIB // !RENDER_DIAGNOSTICS_FULL_TEXT // TARGET_BACKEND: JVM_IR diff --git a/compiler/testData/diagnostics/testsWithJvmBackend/scripts/enumEntryCapturesProperty.txt b/compiler/testData/diagnostics/testsWithJvmBackend/scripts/enumEntryCapturesProperty.txt index 851cfc121d0..16152a74203 100644 --- a/compiler/testData/diagnostics/testsWithJvmBackend/scripts/enumEntryCapturesProperty.txt +++ b/compiler/testData/diagnostics/testsWithJvmBackend/scripts/enumEntryCapturesProperty.txt @@ -24,6 +24,7 @@ public final class EnumEntryCapturesProperty : kotlin.script.templates.standard. public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String // Static members + public final /*synthesized*/ val entries: kotlin.enums.EnumEntries public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): EnumEntryCapturesProperty.Bar public final /*synthesized*/ fun values(): kotlin.Array } diff --git a/compiler/testData/writeFlags/class/accessFlags/mappingWhen.kt b/compiler/testData/writeFlags/class/accessFlags/mappingWhen.kt index 654230c2e59..f9e09f99482 100644 --- a/compiler/testData/writeFlags/class/accessFlags/mappingWhen.kt +++ b/compiler/testData/writeFlags/class/accessFlags/mappingWhen.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class BigEnum { ITEM1, ITEM2 diff --git a/compiler/testData/writeFlags/class/deprecatedFlag/enumClass.kt b/compiler/testData/writeFlags/class/deprecatedFlag/enumClass.kt index e8308c34df7..7dcf53b4d12 100644 --- a/compiler/testData/writeFlags/class/deprecatedFlag/enumClass.kt +++ b/compiler/testData/writeFlags/class/deprecatedFlag/enumClass.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB @Deprecated("") enum class MyEnum { FIRST } diff --git a/compiler/testData/writeFlags/class/visibility/internal/enum.kt b/compiler/testData/writeFlags/class/visibility/internal/enum.kt index fe2786b49c7..86ac3850438 100644 --- a/compiler/testData/writeFlags/class/visibility/internal/enum.kt +++ b/compiler/testData/writeFlags/class/visibility/internal/enum.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class MyClass() { } diff --git a/compiler/testData/writeFlags/class/visibility/internal/innerEnum.kt b/compiler/testData/writeFlags/class/visibility/internal/innerEnum.kt index a4286f152bf..6f2a05c6bdf 100644 --- a/compiler/testData/writeFlags/class/visibility/internal/innerEnum.kt +++ b/compiler/testData/writeFlags/class/visibility/internal/innerEnum.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB class Foo { enum class MyClass() { } diff --git a/compiler/testData/writeFlags/class/visibility/packageprivate/enumEntry.kt b/compiler/testData/writeFlags/class/visibility/packageprivate/enumEntry.kt index 1057270d64a..715166ef9ee 100644 --- a/compiler/testData/writeFlags/class/visibility/packageprivate/enumEntry.kt +++ b/compiler/testData/writeFlags/class/visibility/packageprivate/enumEntry.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class Foo { A { fun foo() {} diff --git a/compiler/testData/writeFlags/class/visibility/private/enum.kt b/compiler/testData/writeFlags/class/visibility/private/enum.kt index f828907646d..0b25ec94a35 100644 --- a/compiler/testData/writeFlags/class/visibility/private/enum.kt +++ b/compiler/testData/writeFlags/class/visibility/private/enum.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB private enum class MyClass() { } diff --git a/compiler/testData/writeFlags/class/visibility/private/innerEnum.kt b/compiler/testData/writeFlags/class/visibility/private/innerEnum.kt index 9e741f1e400..40db3f1db0e 100644 --- a/compiler/testData/writeFlags/class/visibility/private/innerEnum.kt +++ b/compiler/testData/writeFlags/class/visibility/private/innerEnum.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB // NO_FLAGS because we put enum in companion object of foo. When it will be fixed - MyClass should have ACC_PRIVATE flag class Foo { diff --git a/compiler/testData/writeFlags/class/visibility/public/enum.kt b/compiler/testData/writeFlags/class/visibility/public/enum.kt index 5bcda7fb324..da9bd3ee632 100644 --- a/compiler/testData/writeFlags/class/visibility/public/enum.kt +++ b/compiler/testData/writeFlags/class/visibility/public/enum.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB public enum class MyClass() { } diff --git a/compiler/testData/writeFlags/class/visibility/public/innerEnum.kt b/compiler/testData/writeFlags/class/visibility/public/innerEnum.kt index cee3b737e99..e6e536e886b 100644 --- a/compiler/testData/writeFlags/class/visibility/public/innerEnum.kt +++ b/compiler/testData/writeFlags/class/visibility/public/innerEnum.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB class Foo { public enum class MyClass() { } diff --git a/compiler/testData/writeFlags/function/constructors/enum.kt b/compiler/testData/writeFlags/function/constructors/enum.kt index 235310cd3dd..7511357c6ec 100644 --- a/compiler/testData/writeFlags/function/constructors/enum.kt +++ b/compiler/testData/writeFlags/function/constructors/enum.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class Foo { A, B, C } diff --git a/compiler/testData/writeFlags/property/enumFields.kt b/compiler/testData/writeFlags/property/enumFields.kt index b10164604b1..a8c7b938b7d 100644 --- a/compiler/testData/writeFlags/property/enumFields.kt +++ b/compiler/testData/writeFlags/property/enumFields.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB enum class Test { A } diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractScriptCodegenTest.java b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractScriptCodegenTest.java index 6663a8a3bd3..f6848e3eba2 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractScriptCodegenTest.java +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractScriptCodegenTest.java @@ -42,9 +42,16 @@ public abstract class AbstractScriptCodegenTest extends CodegenTestCase { @Override protected void doTest(@NotNull String filename) { - configurationKind = InTextDirectivesUtils.findLinesWithPrefixesRemoved( - FilesKt.readText(new File(filename), Charsets.UTF_8), "// WITH_REFLECT" - ).isEmpty() ? ConfigurationKind.JDK_ONLY : ConfigurationKind.ALL; + String fileContent = FilesKt.readText(new File(filename), Charsets.UTF_8); + + if (InTextDirectivesUtils.isDirectiveDefined(fileContent, "WITH_REFLECT")) { + configurationKind = ConfigurationKind.ALL; + } else if (InTextDirectivesUtils.isDirectiveDefined(fileContent, "WITH_STDLIB")) { + configurationKind = ConfigurationKind.NO_KOTLIN_REFLECT; + } else { + configurationKind = ConfigurationKind.JDK_ONLY; + } + createEnvironmentWithMockJdkAndIdeaAnnotations(configurationKind); loadFileByFullPath(filename); diff --git a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/JvmIrLinkageModeTest.kt b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/JvmIrLinkageModeTest.kt index 6ab696b1c1e..680c67cc0ad 100644 --- a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/JvmIrLinkageModeTest.kt +++ b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/JvmIrLinkageModeTest.kt @@ -48,14 +48,14 @@ class JvmIrLinkageModeTest : CodegenTestCase() { fun testLinkageViaDescriptors() { enableLinkageViaSignatures = false - createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY) + createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.NO_KOTLIN_REFLECT) loadText(source) generateAndCreateClassLoader(true) } fun testLinkageViaSignatures() { enableLinkageViaSignatures = true - createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY) + createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.NO_KOTLIN_REFLECT) loadText(source) generateAndCreateClassLoader(true) } diff --git a/plugins/allopen/testData/bytecodeListing/allOpenOnNotClasses.fir.txt b/plugins/allopen/testData/bytecodeListing/allOpenOnNotClasses.fir.txt deleted file mode 100644 index 98926e8bd64..00000000000 --- a/plugins/allopen/testData/bytecodeListing/allOpenOnNotClasses.fir.txt +++ /dev/null @@ -1,46 +0,0 @@ -@AllOpen -@java.lang.annotation.Retention(value=RUNTIME) -@kotlin.Metadata -public annotation class AllOpen { - // source: 'allOpenOnNotClasses.kt' -} - -@AllOpen -@kotlin.Metadata -public final enum class Enum { - // source: 'allOpenOnNotClasses.kt' - private synthetic final static field $ENTRIES: kotlin.enums.EnumEntries - private synthetic final static field $VALUES: Enum[] - private synthetic final static method $entries(): Enum[] - private synthetic final static method $values(): Enum[] - static method (): void - private method (p0: java.lang.String, p1: int): void - public static @org.jetbrains.annotations.NotNull method getEntries(): kotlin.enums.EnumEntries - public static method valueOf(p0: java.lang.String): Enum - public static method values(): Enum[] -} - -@AllOpen -@kotlin.Metadata -public interface Intf { - // source: 'allOpenOnNotClasses.kt' -} - -@kotlin.Metadata -public final class MyClass { - // source: 'allOpenOnNotClasses.kt' - private @AllOpen @org.jetbrains.annotations.NotNull field prop: java.lang.String - public method (): void - public final @AllOpen @org.jetbrains.annotations.NotNull method getProp(): java.lang.String - public final @AllOpen method method(): void - public final @AllOpen method setProp(@org.jetbrains.annotations.NotNull p0: java.lang.String): void -} - -@AllOpen -@kotlin.Metadata -public final class Obj { - // source: 'allOpenOnNotClasses.kt' - public final static @org.jetbrains.annotations.NotNull field INSTANCE: Obj - static method (): void - private method (): void -} diff --git a/plugins/allopen/testData/bytecodeListing/allOpenOnNotClasses.ir.txt b/plugins/allopen/testData/bytecodeListing/allOpenOnNotClasses.ir.txt index e6fddd96bbe..98926e8bd64 100644 --- a/plugins/allopen/testData/bytecodeListing/allOpenOnNotClasses.ir.txt +++ b/plugins/allopen/testData/bytecodeListing/allOpenOnNotClasses.ir.txt @@ -15,6 +15,7 @@ public final enum class Enum { private synthetic final static method $values(): Enum[] static method (): void private method (p0: java.lang.String, p1: int): void + public static @org.jetbrains.annotations.NotNull method getEntries(): kotlin.enums.EnumEntries public static method valueOf(p0: java.lang.String): Enum public static method values(): Enum[] } diff --git a/plugins/allopen/testData/bytecodeListing/allOpenOnNotClasses.kt b/plugins/allopen/testData/bytecodeListing/allOpenOnNotClasses.kt index 06f09020ab6..0ad61b6c22e 100644 --- a/plugins/allopen/testData/bytecodeListing/allOpenOnNotClasses.kt +++ b/plugins/allopen/testData/bytecodeListing/allOpenOnNotClasses.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB @AllOpen annotation class AllOpen diff --git a/plugins/kapt3/kapt3-compiler/testData/kotlinRunner/Simple.it.ir.txt b/plugins/kapt3/kapt3-compiler/testData/kotlinRunner/Simple.it.ir.txt index 49af9d24a10..cb595895b04 100644 --- a/plugins/kapt3/kapt3-compiler/testData/kotlinRunner/Simple.it.ir.txt +++ b/plugins/kapt3/kapt3-compiler/testData/kotlinRunner/Simple.it.ir.txt @@ -47,6 +47,11 @@ public enum EnumClass { EnumClass() { } + + @org.jetbrains.annotations.NotNull() + public static kotlin.enums.EnumEntries getEntries() { + return null; + } } //////////////////// @@ -62,4 +67,9 @@ public enum EnumClass2 { EnumClass2(java.lang.String blah) { } + + @org.jetbrains.annotations.NotNull() + public static kotlin.enums.EnumEntries getEntries() { + return null; + } } diff --git a/plugins/kapt3/kapt3-compiler/testData/kotlinRunner/Simple.kt b/plugins/kapt3/kapt3-compiler/testData/kotlinRunner/Simple.kt index e7af2fab98d..1c8a8a9d302 100644 --- a/plugins/kapt3/kapt3-compiler/testData/kotlinRunner/Simple.kt +++ b/plugins/kapt3/kapt3-compiler/testData/kotlinRunner/Simple.kt @@ -1,3 +1,5 @@ +// WITH_STDLIB + package test /** diff --git a/plugins/noarg/testData/bytecodeListing/annoOnNotClass.fir.txt b/plugins/noarg/testData/bytecodeListing/annoOnNotClass.fir.txt deleted file mode 100644 index d7bb8259c3e..00000000000 --- a/plugins/noarg/testData/bytecodeListing/annoOnNotClass.fir.txt +++ /dev/null @@ -1,48 +0,0 @@ -@NoArg -@kotlin.Metadata -public final enum class Colors { - // source: 'annoOnNotClass.kt' - private synthetic final static field $ENTRIES: kotlin.enums.EnumEntries - private synthetic final static field $VALUES: Colors[] - public final enum static field RED: Colors - public final enum static field WHITE: Colors - private synthetic final static method $entries(): Colors[] - private synthetic final static method $values(): Colors[] - static method (): void - private method (p0: java.lang.String, p1: int): void - public static @org.jetbrains.annotations.NotNull method getEntries(): kotlin.enums.EnumEntries - public static method valueOf(p0: java.lang.String): Colors - public static method values(): Colors[] -} - -@NoArg -@kotlin.Metadata -public interface Intf { - // source: 'annoOnNotClass.kt' -} - -@kotlin.Metadata -public final class MyClass { - // source: 'annoOnNotClass.kt' - private @NoArg @org.jetbrains.annotations.NotNull field abc: java.lang.String - public method (p0: int): void - public final @NoArg @org.jetbrains.annotations.NotNull method getAbc(): java.lang.String - public final @NoArg method setAbc(@org.jetbrains.annotations.NotNull p0: java.lang.String): void - public final @NoArg method someFun(): void -} - -@NoArg -@java.lang.annotation.Retention(value=RUNTIME) -@kotlin.Metadata -public annotation class NoArg { - // source: 'annoOnNotClass.kt' -} - -@NoArg -@kotlin.Metadata -public final class Obj { - // source: 'annoOnNotClass.kt' - public final static @org.jetbrains.annotations.NotNull field INSTANCE: Obj - static method (): void - private method (): void -} diff --git a/plugins/noarg/testData/bytecodeListing/annoOnNotClass.ir.txt b/plugins/noarg/testData/bytecodeListing/annoOnNotClass.ir.txt index 650aec46d48..d7bb8259c3e 100644 --- a/plugins/noarg/testData/bytecodeListing/annoOnNotClass.ir.txt +++ b/plugins/noarg/testData/bytecodeListing/annoOnNotClass.ir.txt @@ -10,6 +10,7 @@ public final enum class Colors { private synthetic final static method $values(): Colors[] static method (): void private method (p0: java.lang.String, p1: int): void + public static @org.jetbrains.annotations.NotNull method getEntries(): kotlin.enums.EnumEntries public static method valueOf(p0: java.lang.String): Colors public static method values(): Colors[] } diff --git a/plugins/noarg/testData/bytecodeListing/annoOnNotClass.kt b/plugins/noarg/testData/bytecodeListing/annoOnNotClass.kt index 00b0f5c307f..18c9503221c 100644 --- a/plugins/noarg/testData/bytecodeListing/annoOnNotClass.kt +++ b/plugins/noarg/testData/bytecodeListing/annoOnNotClass.kt @@ -1,3 +1,4 @@ +// WITH_STDLIB @NoArg annotation class NoArg