diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/codegen/ir/FirBytecodeTextTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/codegen/ir/FirBytecodeTextTestGenerated.java index d15c74a552d..5aab02dcb1e 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/codegen/ir/FirBytecodeTextTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/codegen/ir/FirBytecodeTextTestGenerated.java @@ -4974,11 +4974,6 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { runTest("compiler/testData/codegen/bytecodeText/whenEnumOptimization/kt14802.kt"); } - @TestMetadata("kt15806.kt") - public void testKt15806() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/whenEnumOptimization/kt15806.kt"); - } - @TestMetadata("manyWhensWithinClass.kt") public void testManyWhensWithinClass() throws Exception { runTest("compiler/testData/codegen/bytecodeText/whenEnumOptimization/manyWhensWithinClass.kt"); diff --git a/compiler/testData/codegen/bytecodeText/whenEnumOptimization/kt15806.kt b/compiler/testData/codegen/bytecodeText/whenEnumOptimization/kt15806.kt deleted file mode 100644 index 5be6fa29db8..00000000000 --- a/compiler/testData/codegen/bytecodeText/whenEnumOptimization/kt15806.kt +++ /dev/null @@ -1,29 +0,0 @@ -// IGNORE_BACKEND: JVM_IR -// TODO KT-36845 Generate enum-based TABLESWITCH/LOOKUPSWITCH on a value with smart cast to enum in JVM_IR - -private fun Any?.doTheThing(): String { - when (this) { - is String -> return this - is Level -> { - when (this) { - Level.O -> return Level.O.name - Level.K -> return Level.K.name - } - } - - else -> return "fail" - } -} - - -enum class Level { - O, - K -} - - -fun box(): String { - return "O".doTheThing() + Level.K.doTheThing() -} - -// 1 TABLESWITCH diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java index 6fcef959ef7..748faa774f3 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java @@ -4991,11 +4991,6 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { runTest("compiler/testData/codegen/bytecodeText/whenEnumOptimization/kt14802.kt"); } - @TestMetadata("kt15806.kt") - public void testKt15806() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/whenEnumOptimization/kt15806.kt"); - } - @TestMetadata("manyWhensWithinClass.kt") public void testManyWhensWithinClass() throws Exception { runTest("compiler/testData/codegen/bytecodeText/whenEnumOptimization/manyWhensWithinClass.kt"); diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBytecodeTextTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBytecodeTextTestGenerated.java index f8976f8f180..c6f9499ee57 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBytecodeTextTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBytecodeTextTestGenerated.java @@ -4974,11 +4974,6 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { runTest("compiler/testData/codegen/bytecodeText/whenEnumOptimization/kt14802.kt"); } - @TestMetadata("kt15806.kt") - public void testKt15806() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/whenEnumOptimization/kt15806.kt"); - } - @TestMetadata("manyWhensWithinClass.kt") public void testManyWhensWithinClass() throws Exception { runTest("compiler/testData/codegen/bytecodeText/whenEnumOptimization/manyWhensWithinClass.kt");