JVM: support enumEntries intrinsic for Kotlin enums
Implementation is very similar to the `enumValues` intrinsic. Java enums and old (pre-1.9) Kotlin enums will be supported in a subsequent commit. #KT-59710
This commit is contained in:
committed by
Space Team
parent
c94c5a7d58
commit
874d1c514a
@@ -90,6 +90,8 @@ public class AsmTypes {
|
|||||||
|
|
||||||
public static final Type DEFAULT_CONSTRUCTOR_MARKER = Type.getObjectType("kotlin/jvm/internal/DefaultConstructorMarker");
|
public static final Type DEFAULT_CONSTRUCTOR_MARKER = Type.getObjectType("kotlin/jvm/internal/DefaultConstructorMarker");
|
||||||
|
|
||||||
|
public static final Type ENUM_ENTRIES = Type.getObjectType("kotlin/enums/EnumEntries");
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private static Type reflect(@NotNull String className) {
|
private static Type reflect(@NotNull String className) {
|
||||||
return Type.getObjectType("kotlin/reflect/" + className);
|
return Type.getObjectType("kotlin/reflect/" + className);
|
||||||
|
|||||||
@@ -359,6 +359,16 @@ class ReifiedTypeInliner<KT : KotlinTypeMarker>(
|
|||||||
val desc = getSpecialEnumFunDescriptor(parameter, false)
|
val desc = getSpecialEnumFunDescriptor(parameter, false)
|
||||||
instructions.insert(insn, MethodInsnNode(Opcodes.INVOKESTATIC, parameter.internalName, "values", desc, false))
|
instructions.insert(insn, MethodInsnNode(Opcodes.INVOKESTATIC, parameter.internalName, "values", desc, false))
|
||||||
return true
|
return true
|
||||||
|
} else if (next1.opcode == Opcodes.ACONST_NULL && next2.opcode == Opcodes.CHECKCAST) {
|
||||||
|
instructions.remove(next1)
|
||||||
|
instructions.remove(next2)
|
||||||
|
// TODO: support enumEntries for Java enums.
|
||||||
|
instructions.insert(
|
||||||
|
insn, MethodInsnNode(
|
||||||
|
Opcodes.INVOKESTATIC, parameter.internalName, "getEntries", Type.getMethodDescriptor(AsmTypes.ENUM_ENTRIES), false
|
||||||
|
)
|
||||||
|
)
|
||||||
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
return false
|
return false
|
||||||
|
|||||||
+24
@@ -2400,6 +2400,30 @@ public class FirLightTreeBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated e
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntries.kt")
|
||||||
|
public void testEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntriesChainCapturedType.kt")
|
||||||
|
public void testEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("javaEnumEntries.kt")
|
||||||
|
public void testJavaEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/javaEnumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("javaEnumEntriesChainCapturedType.kt")
|
||||||
|
public void testJavaEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/javaEnumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt10569.kt")
|
@TestMetadata("kt10569.kt")
|
||||||
public void testKt10569() throws Exception {
|
public void testKt10569() throws Exception {
|
||||||
|
|||||||
+24
@@ -2400,6 +2400,30 @@ public class FirLightTreeBlackBoxInlineCodegenWithIrInlinerTestGenerated extends
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntries.kt")
|
||||||
|
public void testEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntriesChainCapturedType.kt")
|
||||||
|
public void testEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("javaEnumEntries.kt")
|
||||||
|
public void testJavaEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/javaEnumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("javaEnumEntriesChainCapturedType.kt")
|
||||||
|
public void testJavaEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/javaEnumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt10569.kt")
|
@TestMetadata("kt10569.kt")
|
||||||
public void testKt10569() throws Exception {
|
public void testKt10569() throws Exception {
|
||||||
|
|||||||
+12
@@ -2230,6 +2230,18 @@ public class FirLightTreeBytecodeTextTestGenerated extends AbstractFirLightTreeB
|
|||||||
runTest("compiler/testData/codegen/bytecodeText/enum/enumEntries.kt");
|
runTest("compiler/testData/codegen/bytecodeText/enum/enumEntries.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntriesIntrinsic.kt")
|
||||||
|
public void testEnumEntriesIntrinsic() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeText/enum/enumEntriesIntrinsic.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntriesIntrinsicForJava.kt")
|
||||||
|
public void testEnumEntriesIntrinsicForJava() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeText/enum/enumEntriesIntrinsicForJava.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("enumEntriesMapping.kt")
|
@TestMetadata("enumEntriesMapping.kt")
|
||||||
public void testEnumEntriesMapping() throws Exception {
|
public void testEnumEntriesMapping() throws Exception {
|
||||||
|
|||||||
+24
@@ -2400,6 +2400,30 @@ public class FirLightTreeSerializeCompileKotlinAgainstInlineKotlinTestGenerated
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR_SERIALIZE, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR_SERIALIZE, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntries.kt")
|
||||||
|
public void testEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntriesChainCapturedType.kt")
|
||||||
|
public void testEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("javaEnumEntries.kt")
|
||||||
|
public void testJavaEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/javaEnumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("javaEnumEntriesChainCapturedType.kt")
|
||||||
|
public void testJavaEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/javaEnumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt10569.kt")
|
@TestMetadata("kt10569.kt")
|
||||||
public void testKt10569() throws Exception {
|
public void testKt10569() throws Exception {
|
||||||
|
|||||||
+24
@@ -2400,6 +2400,30 @@ public class FirPsiBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated extends
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntries.kt")
|
||||||
|
public void testEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntriesChainCapturedType.kt")
|
||||||
|
public void testEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("javaEnumEntries.kt")
|
||||||
|
public void testJavaEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/javaEnumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("javaEnumEntriesChainCapturedType.kt")
|
||||||
|
public void testJavaEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/javaEnumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt10569.kt")
|
@TestMetadata("kt10569.kt")
|
||||||
public void testKt10569() throws Exception {
|
public void testKt10569() throws Exception {
|
||||||
|
|||||||
+24
@@ -2400,6 +2400,30 @@ public class FirPsiBlackBoxInlineCodegenWithIrInlinerTestGenerated extends Abstr
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntries.kt")
|
||||||
|
public void testEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntriesChainCapturedType.kt")
|
||||||
|
public void testEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("javaEnumEntries.kt")
|
||||||
|
public void testJavaEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/javaEnumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("javaEnumEntriesChainCapturedType.kt")
|
||||||
|
public void testJavaEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/javaEnumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt10569.kt")
|
@TestMetadata("kt10569.kt")
|
||||||
public void testKt10569() throws Exception {
|
public void testKt10569() throws Exception {
|
||||||
|
|||||||
+12
@@ -2230,6 +2230,18 @@ public class FirPsiBytecodeTextTestGenerated extends AbstractFirPsiBytecodeTextT
|
|||||||
runTest("compiler/testData/codegen/bytecodeText/enum/enumEntries.kt");
|
runTest("compiler/testData/codegen/bytecodeText/enum/enumEntries.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntriesIntrinsic.kt")
|
||||||
|
public void testEnumEntriesIntrinsic() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeText/enum/enumEntriesIntrinsic.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntriesIntrinsicForJava.kt")
|
||||||
|
public void testEnumEntriesIntrinsicForJava() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeText/enum/enumEntriesIntrinsicForJava.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("enumEntriesMapping.kt")
|
@TestMetadata("enumEntriesMapping.kt")
|
||||||
public void testEnumEntriesMapping() throws Exception {
|
public void testEnumEntriesMapping() throws Exception {
|
||||||
|
|||||||
+24
@@ -2400,6 +2400,30 @@ public class FirPsiSerializeCompileKotlinAgainstInlineKotlinTestGenerated extend
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR_SERIALIZE, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR_SERIALIZE, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntries.kt")
|
||||||
|
public void testEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntriesChainCapturedType.kt")
|
||||||
|
public void testEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("javaEnumEntries.kt")
|
||||||
|
public void testJavaEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/javaEnumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("javaEnumEntriesChainCapturedType.kt")
|
||||||
|
public void testJavaEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/javaEnumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt10569.kt")
|
@TestMetadata("kt10569.kt")
|
||||||
public void testKt10569() throws Exception {
|
public void testKt10569() throws Exception {
|
||||||
|
|||||||
+21
-4
@@ -5,10 +5,7 @@
|
|||||||
|
|
||||||
package org.jetbrains.kotlin.backend.jvm.intrinsics
|
package org.jetbrains.kotlin.backend.jvm.intrinsics
|
||||||
|
|
||||||
import org.jetbrains.kotlin.backend.jvm.codegen.BlockInfo
|
import org.jetbrains.kotlin.backend.jvm.codegen.*
|
||||||
import org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen
|
|
||||||
import org.jetbrains.kotlin.backend.jvm.codegen.MaterialValue
|
|
||||||
import org.jetbrains.kotlin.backend.jvm.codegen.materializedAt
|
|
||||||
import org.jetbrains.kotlin.backend.jvm.ir.isReifiedTypeParameter
|
import org.jetbrains.kotlin.backend.jvm.ir.isReifiedTypeParameter
|
||||||
import org.jetbrains.kotlin.codegen.AsmUtil
|
import org.jetbrains.kotlin.codegen.AsmUtil
|
||||||
import org.jetbrains.kotlin.codegen.inline.ReifiedTypeInliner
|
import org.jetbrains.kotlin.codegen.inline.ReifiedTypeInliner
|
||||||
@@ -69,3 +66,23 @@ object EnumValues : IntrinsicMethod() {
|
|||||||
|
|
||||||
private val ENUM_ARRAY_TYPE = AsmUtil.getArrayType(AsmTypes.ENUM_TYPE)
|
private val ENUM_ARRAY_TYPE = AsmUtil.getArrayType(AsmTypes.ENUM_TYPE)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
object EnumEntries : IntrinsicMethod() {
|
||||||
|
override fun invoke(expression: IrFunctionAccessExpression, codegen: ExpressionCodegen, data: BlockInfo) = with(codegen) {
|
||||||
|
val type = expression.getTypeArgument(0)!!
|
||||||
|
if (type.isReifiedTypeParameter) {
|
||||||
|
// Note that the inliner expects exactly the following sequence of instructions.
|
||||||
|
// <REIFIED-OPERATIONS-MARKER>
|
||||||
|
// ACONST_NULL
|
||||||
|
// CHECKCAST Lkotlin/enums/EnumEntries;
|
||||||
|
putReifiedOperationMarkerIfTypeIsReifiedParameter(type, ReifiedTypeInliner.OperationKind.ENUM_REIFIED)
|
||||||
|
mv.aconst(null)
|
||||||
|
mv.checkcast(AsmTypes.ENUM_ENTRIES)
|
||||||
|
MaterialValue(codegen, AsmTypes.ENUM_ENTRIES, expression.type)
|
||||||
|
} else {
|
||||||
|
// TODO: support enumEntries for Java enums.
|
||||||
|
mv.invokestatic(typeMapper.mapType(type).internalName, "getEntries", Type.getMethodDescriptor(AsmTypes.ENUM_ENTRIES), false)
|
||||||
|
MaterialValue(codegen, AsmTypes.ENUM_ENTRIES, expression.type)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
+2
@@ -35,6 +35,7 @@ class IrIntrinsicMethods(val irBuiltIns: IrBuiltIns, val symbols: JvmSymbols) {
|
|||||||
private val kotlinJvmFqn = FqName("kotlin.jvm")
|
private val kotlinJvmFqn = FqName("kotlin.jvm")
|
||||||
private val kotlinJvmInternalUnsafeFqn = FqName("kotlin.jvm.internal.unsafe")
|
private val kotlinJvmInternalUnsafeFqn = FqName("kotlin.jvm.internal.unsafe")
|
||||||
private val kotlinReflectFqn = StandardNames.KOTLIN_REFLECT_FQ_NAME
|
private val kotlinReflectFqn = StandardNames.KOTLIN_REFLECT_FQ_NAME
|
||||||
|
private val kotlinEnumsFqn = FqName("kotlin.enums")
|
||||||
|
|
||||||
private val anyFqn = StandardNames.FqNames.any.toSafe()
|
private val anyFqn = StandardNames.FqNames.any.toSafe()
|
||||||
private val arrayFqn = StandardNames.FqNames.array.toSafe()
|
private val arrayFqn = StandardNames.FqNames.array.toSafe()
|
||||||
@@ -56,6 +57,7 @@ class IrIntrinsicMethods(val irBuiltIns: IrBuiltIns, val symbols: JvmSymbols) {
|
|||||||
Key(cloneableFqn, null, "clone", emptyList()) to Clone,
|
Key(cloneableFqn, null, "clone", emptyList()) to Clone,
|
||||||
Key(kotlinFqn, null, "enumValues", listOf()) to EnumValues,
|
Key(kotlinFqn, null, "enumValues", listOf()) to EnumValues,
|
||||||
Key(kotlinFqn, null, "enumValueOf", listOf(stringFqn)) to EnumValueOf,
|
Key(kotlinFqn, null, "enumValueOf", listOf(stringFqn)) to EnumValueOf,
|
||||||
|
Key(kotlinEnumsFqn, null, "enumEntries", listOf()) to EnumEntries,
|
||||||
Key(kotlinFqn, stringFqn, "plus", listOf(anyFqn)) to StringPlus,
|
Key(kotlinFqn, stringFqn, "plus", listOf(anyFqn)) to StringPlus,
|
||||||
Key(kotlinReflectFqn, null, "typeOf", listOf()) to TypeOf,
|
Key(kotlinReflectFqn, null, "typeOf", listOf()) to TypeOf,
|
||||||
irBuiltIns.eqeqSymbol.toKey()!! to Equals(KtTokens.EQEQ),
|
irBuiltIns.eqeqSymbol.toKey()!! to Equals(KtTokens.EQEQ),
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
// IGNORE_BACKEND_MULTI_MODULE: JVM_MULTI_MODULE_OLD_AGAINST_IR
|
||||||
|
// NO_CHECK_LAMBDA_INLINING
|
||||||
|
// WITH_STDLIB
|
||||||
|
// !OPT_IN: kotlin.ExperimentalStdlibApi
|
||||||
|
// FILE: 1.kt
|
||||||
|
|
||||||
|
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") // TODO: remove once KT-53154 is fixed.
|
||||||
|
|
||||||
|
package test
|
||||||
|
|
||||||
|
import kotlin.enums.enumEntries
|
||||||
|
|
||||||
|
inline fun <reified T : Enum<T>> myEntries(): String {
|
||||||
|
val values = enumEntries<T>()
|
||||||
|
return values.joinToString("")
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Z {
|
||||||
|
O, K
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// FILE: 2.kt
|
||||||
|
|
||||||
|
import test.*
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
return myEntries<Z>()
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
// IGNORE_BACKEND_MULTI_MODULE: JVM_MULTI_MODULE_OLD_AGAINST_IR
|
||||||
|
// WITH_STDLIB
|
||||||
|
// !OPT_IN: kotlin.ExperimentalStdlibApi
|
||||||
|
// FILE: 1.kt
|
||||||
|
|
||||||
|
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") // TODO: remove once KT-53154 is fixed.
|
||||||
|
|
||||||
|
package test
|
||||||
|
|
||||||
|
import kotlin.enums.enumEntries
|
||||||
|
|
||||||
|
inline fun <reified Y : Enum<Y>> myEntries2(): String {
|
||||||
|
val entries = { enumEntries<Y>() }.let { it() }
|
||||||
|
return entries.joinToString("")
|
||||||
|
}
|
||||||
|
|
||||||
|
inline fun <reified T : Enum<T>> myEntries(): String {
|
||||||
|
return myEntries2<T>()
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Z {
|
||||||
|
O, K
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// FILE: 2.kt
|
||||||
|
|
||||||
|
import test.*
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
return myEntries<Z>()
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
// IGNORE_BACKEND: JVM_IR
|
||||||
|
|
||||||
|
// TARGET_BACKEND: JVM_IR
|
||||||
|
// !OPT_IN: kotlin.ExperimentalStdlibApi
|
||||||
|
// WITH_STDLIB
|
||||||
|
// FILE: test/Z.java
|
||||||
|
|
||||||
|
package test;
|
||||||
|
|
||||||
|
public enum Z {
|
||||||
|
O, K
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: 1.kt
|
||||||
|
|
||||||
|
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") // TODO: remove once KT-53154 is fixed.
|
||||||
|
|
||||||
|
package test
|
||||||
|
|
||||||
|
import kotlin.enums.enumEntries
|
||||||
|
|
||||||
|
inline fun <reified T : Enum<T>> myEntries(): String {
|
||||||
|
val values = enumEntries<T>()
|
||||||
|
return values.joinToString("")
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: 2.kt
|
||||||
|
|
||||||
|
import test.*
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
return myEntries<Z>()
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
// IGNORE_BACKEND: JVM_IR
|
||||||
|
|
||||||
|
// TARGET_BACKEND: JVM_IR
|
||||||
|
// WITH_STDLIB
|
||||||
|
// !OPT_IN: kotlin.ExperimentalStdlibApi
|
||||||
|
// FILE: test/Z.java
|
||||||
|
|
||||||
|
package test;
|
||||||
|
|
||||||
|
public enum Z {
|
||||||
|
O, K
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: 1.kt
|
||||||
|
|
||||||
|
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") // TODO: remove once KT-53154 is fixed.
|
||||||
|
|
||||||
|
package test
|
||||||
|
|
||||||
|
import kotlin.enums.enumEntries
|
||||||
|
|
||||||
|
inline fun <reified Y : Enum<Y>> myEntries2(): String {
|
||||||
|
val entries = { enumEntries<Y>() }.let { it() }
|
||||||
|
return entries.joinToString("")
|
||||||
|
}
|
||||||
|
|
||||||
|
inline fun <reified T : Enum<T>> myEntries(): String {
|
||||||
|
return myEntries2<T>()
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: 2.kt
|
||||||
|
|
||||||
|
import test.*
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
return myEntries<Z>()
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
// TARGET_BACKEND: JVM_IR
|
||||||
|
// WITH_STDLIB
|
||||||
|
// !OPT_IN: kotlin.ExperimentalStdlibApi
|
||||||
|
|
||||||
|
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") // TODO: remove once KT-53154 is fixed.
|
||||||
|
import kotlin.enums.*
|
||||||
|
|
||||||
|
enum class MyEnum {
|
||||||
|
E
|
||||||
|
}
|
||||||
|
|
||||||
|
inline fun <reified T : Enum<T>> enumEntries2(): EnumEntries<T> = enumEntries<T>()
|
||||||
|
|
||||||
|
fun foo() {
|
||||||
|
enumEntries<MyEnum>()
|
||||||
|
enumEntries2<MyEnum>()
|
||||||
|
}
|
||||||
|
|
||||||
|
// There should be one call to enumEntries in MyEnum.<clinit>.
|
||||||
|
// 1 INVOKESTATIC kotlin/enums/EnumEntriesKt.enumEntries
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
// TARGET_BACKEND: JVM_IR
|
||||||
|
// WITH_STDLIB
|
||||||
|
// !OPT_IN: kotlin.ExperimentalStdlibApi
|
||||||
|
// FILE: MyEnum.java
|
||||||
|
|
||||||
|
enum MyEnum {
|
||||||
|
E
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: 1.kt
|
||||||
|
|
||||||
|
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") // TODO: remove once KT-53154 is fixed.
|
||||||
|
import kotlin.enums.*
|
||||||
|
|
||||||
|
inline fun <reified T : Enum<T>> enumEntries2(): EnumEntries<T> = enumEntries<T>()
|
||||||
|
|
||||||
|
fun foo() {
|
||||||
|
enumEntries<MyEnum>()
|
||||||
|
enumEntries2<MyEnum>()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 0 INVOKESTATIC kotlin/enums/EnumEntriesKt.enumEntries
|
||||||
+12
@@ -2376,6 +2376,18 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntries.kt")
|
||||||
|
public void testEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntriesChainCapturedType.kt")
|
||||||
|
public void testEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt10569.kt")
|
@TestMetadata("kt10569.kt")
|
||||||
public void testKt10569() throws Exception {
|
public void testKt10569() throws Exception {
|
||||||
|
|||||||
+12
@@ -2376,6 +2376,18 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntries.kt")
|
||||||
|
public void testEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntriesChainCapturedType.kt")
|
||||||
|
public void testEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt10569.kt")
|
@TestMetadata("kt10569.kt")
|
||||||
public void testKt10569() throws Exception {
|
public void testKt10569() throws Exception {
|
||||||
|
|||||||
+24
@@ -2400,6 +2400,30 @@ public class IrBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated extends Abs
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntries.kt")
|
||||||
|
public void testEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntriesChainCapturedType.kt")
|
||||||
|
public void testEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("javaEnumEntries.kt")
|
||||||
|
public void testJavaEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/javaEnumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("javaEnumEntriesChainCapturedType.kt")
|
||||||
|
public void testJavaEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/javaEnumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt10569.kt")
|
@TestMetadata("kt10569.kt")
|
||||||
public void testKt10569() throws Exception {
|
public void testKt10569() throws Exception {
|
||||||
|
|||||||
+24
@@ -2400,6 +2400,30 @@ public class IrBlackBoxInlineCodegenWithIrInlinerTestGenerated extends AbstractI
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntries.kt")
|
||||||
|
public void testEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntriesChainCapturedType.kt")
|
||||||
|
public void testEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("javaEnumEntries.kt")
|
||||||
|
public void testJavaEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/javaEnumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("javaEnumEntriesChainCapturedType.kt")
|
||||||
|
public void testJavaEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/javaEnumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt10569.kt")
|
@TestMetadata("kt10569.kt")
|
||||||
public void testKt10569() throws Exception {
|
public void testKt10569() throws Exception {
|
||||||
|
|||||||
+12
@@ -2230,6 +2230,18 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest {
|
|||||||
runTest("compiler/testData/codegen/bytecodeText/enum/enumEntries.kt");
|
runTest("compiler/testData/codegen/bytecodeText/enum/enumEntries.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntriesIntrinsic.kt")
|
||||||
|
public void testEnumEntriesIntrinsic() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeText/enum/enumEntriesIntrinsic.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntriesIntrinsicForJava.kt")
|
||||||
|
public void testEnumEntriesIntrinsicForJava() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeText/enum/enumEntriesIntrinsicForJava.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("enumEntriesMapping.kt")
|
@TestMetadata("enumEntriesMapping.kt")
|
||||||
public void testEnumEntriesMapping() throws Exception {
|
public void testEnumEntriesMapping() throws Exception {
|
||||||
|
|||||||
+24
@@ -2400,6 +2400,30 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntries.kt")
|
||||||
|
public void testEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntriesChainCapturedType.kt")
|
||||||
|
public void testEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("javaEnumEntries.kt")
|
||||||
|
public void testJavaEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/javaEnumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("javaEnumEntriesChainCapturedType.kt")
|
||||||
|
public void testJavaEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/javaEnumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt10569.kt")
|
@TestMetadata("kt10569.kt")
|
||||||
public void testKt10569() throws Exception {
|
public void testKt10569() throws Exception {
|
||||||
|
|||||||
+24
@@ -2400,6 +2400,30 @@ public class IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated extends Ab
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntries.kt")
|
||||||
|
public void testEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntriesChainCapturedType.kt")
|
||||||
|
public void testEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("javaEnumEntries.kt")
|
||||||
|
public void testJavaEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/javaEnumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("javaEnumEntriesChainCapturedType.kt")
|
||||||
|
public void testJavaEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/javaEnumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt10569.kt")
|
@TestMetadata("kt10569.kt")
|
||||||
public void testKt10569() throws Exception {
|
public void testKt10569() throws Exception {
|
||||||
|
|||||||
+24
@@ -2400,6 +2400,30 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntries.kt")
|
||||||
|
public void testEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntriesChainCapturedType.kt")
|
||||||
|
public void testEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("javaEnumEntries.kt")
|
||||||
|
public void testJavaEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/javaEnumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("javaEnumEntriesChainCapturedType.kt")
|
||||||
|
public void testJavaEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/javaEnumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt10569.kt")
|
@TestMetadata("kt10569.kt")
|
||||||
public void testKt10569() throws Exception {
|
public void testKt10569() throws Exception {
|
||||||
|
|||||||
+12
@@ -2376,6 +2376,18 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntries.kt")
|
||||||
|
public void testEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntriesChainCapturedType.kt")
|
||||||
|
public void testEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt10569.kt")
|
@TestMetadata("kt10569.kt")
|
||||||
public void testKt10569() throws Exception {
|
public void testKt10569() throws Exception {
|
||||||
|
|||||||
Generated
+12
@@ -2088,6 +2088,18 @@ public class FirJsCodegenInlineTestGenerated extends AbstractFirJsCodegenInlineT
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntries.kt")
|
||||||
|
public void testEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntriesChainCapturedType.kt")
|
||||||
|
public void testEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt10569.kt")
|
@TestMetadata("kt10569.kt")
|
||||||
public void testKt10569() throws Exception {
|
public void testKt10569() throws Exception {
|
||||||
|
|||||||
+12
@@ -2088,6 +2088,18 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntries.kt")
|
||||||
|
public void testEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntriesChainCapturedType.kt")
|
||||||
|
public void testEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt10569.kt")
|
@TestMetadata("kt10569.kt")
|
||||||
public void testKt10569() throws Exception {
|
public void testKt10569() throws Exception {
|
||||||
|
|||||||
Generated
+12
@@ -2088,6 +2088,18 @@ public class IrJsES6CodegenInlineTestGenerated extends AbstractIrJsES6CodegenInl
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntries.kt")
|
||||||
|
public void testEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntriesChainCapturedType.kt")
|
||||||
|
public void testEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt10569.kt")
|
@TestMetadata("kt10569.kt")
|
||||||
public void testKt10569() throws Exception {
|
public void testKt10569() throws Exception {
|
||||||
|
|||||||
+12
@@ -43015,6 +43015,18 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntries.kt")
|
||||||
|
public void testEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntriesChainCapturedType.kt")
|
||||||
|
public void testEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt10569.kt")
|
@TestMetadata("kt10569.kt")
|
||||||
public void testKt10569() throws Exception {
|
public void testKt10569() throws Exception {
|
||||||
|
|||||||
+12
@@ -44113,6 +44113,18 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntries.kt")
|
||||||
|
public void testEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntriesChainCapturedType.kt")
|
||||||
|
public void testEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt10569.kt")
|
@TestMetadata("kt10569.kt")
|
||||||
public void testKt10569() throws Exception {
|
public void testKt10569() throws Exception {
|
||||||
|
|||||||
+12
@@ -42467,6 +42467,18 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntries.kt")
|
||||||
|
public void testEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntriesChainCapturedType.kt")
|
||||||
|
public void testEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt10569.kt")
|
@TestMetadata("kt10569.kt")
|
||||||
public void testKt10569() throws Exception {
|
public void testKt10569() throws Exception {
|
||||||
|
|||||||
+12
@@ -43016,6 +43016,18 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntries.kt")
|
||||||
|
public void testEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntriesChainCapturedType.kt")
|
||||||
|
public void testEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt10569.kt")
|
@TestMetadata("kt10569.kt")
|
||||||
public void testKt10569() throws Exception {
|
public void testKt10569() throws Exception {
|
||||||
|
|||||||
Generated
+12
@@ -2088,6 +2088,18 @@ public class FirWasmCodegenBoxInlineTestGenerated extends AbstractFirWasmCodegen
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.WASM, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.WASM, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntries.kt")
|
||||||
|
public void testEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntriesChainCapturedType.kt")
|
||||||
|
public void testEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt10569.kt")
|
@TestMetadata("kt10569.kt")
|
||||||
public void testKt10569() throws Exception {
|
public void testKt10569() throws Exception {
|
||||||
|
|||||||
Generated
+12
@@ -2088,6 +2088,18 @@ public class K1WasmCodegenBoxInlineTestGenerated extends AbstractK1WasmCodegenBo
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.WASM, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.WASM, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntries.kt")
|
||||||
|
public void testEnumEntries() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntries.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntriesChainCapturedType.kt")
|
||||||
|
public void testEnumEntriesChainCapturedType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/enum/enumEntriesChainCapturedType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt10569.kt")
|
@TestMetadata("kt10569.kt")
|
||||||
public void testKt10569() throws Exception {
|
public void testKt10569() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user