JVM IR: fix detection of enum entries in the same module

Use the new `IrClass.hasEnumEntries` flag added in the previous commit.

 #KT-61208 Fixed
This commit is contained in:
Alexander Udalov
2023-08-15 22:49:57 +02:00
committed by Space Team
parent c33c918bd4
commit 6219f7fc0d
21 changed files with 133 additions and 3 deletions
@@ -886,6 +886,11 @@ public class IncrementalK1JvmJpsTestGenerated extends AbstractIncrementalK1JvmJp
runTest("jps/jps-plugin/testData/incremental/pureKotlin/dependencyClassReferenced/");
}
@TestMetadata("entriesMappings")
public void testEntriesMappings() throws Exception {
runTest("jps/jps-plugin/testData/incremental/pureKotlin/entriesMappings/");
}
@TestMetadata("fileWithConstantRemoved")
public void testFileWithConstantRemoved() throws Exception {
runTest("jps/jps-plugin/testData/incremental/pureKotlin/fileWithConstantRemoved/");
@@ -212,6 +212,11 @@ public class IncrementalK2FirICLightTreeJvmJpsTestGenerated extends AbstractIncr
runTest("jps/jps-plugin/testData/incremental/pureKotlin/dependencyClassReferenced/");
}
@TestMetadata("entriesMappings")
public void testEntriesMappings() throws Exception {
runTest("jps/jps-plugin/testData/incremental/pureKotlin/entriesMappings/");
}
@TestMetadata("fileWithConstantRemoved")
public void testFileWithConstantRemoved() throws Exception {
runTest("jps/jps-plugin/testData/incremental/pureKotlin/fileWithConstantRemoved/");
@@ -212,6 +212,11 @@ public class IncrementalK2JvmJpsTestGenerated extends AbstractIncrementalK2JvmJp
runTest("jps/jps-plugin/testData/incremental/pureKotlin/dependencyClassReferenced/");
}
@TestMetadata("entriesMappings")
public void testEntriesMappings() throws Exception {
runTest("jps/jps-plugin/testData/incremental/pureKotlin/entriesMappings/");
}
@TestMetadata("fileWithConstantRemoved")
public void testFileWithConstantRemoved() throws Exception {
runTest("jps/jps-plugin/testData/incremental/pureKotlin/fileWithConstantRemoved/");
@@ -212,6 +212,11 @@ public class IncrementalK2LightTreeJvmJpsTestGenerated extends AbstractIncrement
runTest("jps/jps-plugin/testData/incremental/pureKotlin/dependencyClassReferenced/");
}
@TestMetadata("entriesMappings")
public void testEntriesMappings() throws Exception {
runTest("jps/jps-plugin/testData/incremental/pureKotlin/entriesMappings/");
}
@TestMetadata("fileWithConstantRemoved")
public void testFileWithConstantRemoved() throws Exception {
runTest("jps/jps-plugin/testData/incremental/pureKotlin/fileWithConstantRemoved/");
@@ -0,0 +1 @@
enum class EnumClass { A, B, C }
@@ -0,0 +1,11 @@
================ Step #1 =================
Cleaning output files:
out/production/module/EntriesKt.class
out/production/module/META-INF/module.kotlin_module
End of files
Compiling files:
src/entries.kt
End of files
Exit code: OK
------------------------------------------
@@ -0,0 +1,5 @@
fun test() {
EnumClass.entries.forEach {
println(it)
}
}
@@ -0,0 +1,7 @@
fun test() {
EnumClass.entries.forEach {
println(it)
}
}
// empty line
@@ -0,0 +1,7 @@
================ Step #1 =================
Compiling files:
src/entries.kt
End of files
Exit code: OK
------------------------------------------