Fix for KT-6552 IllegalAccessError in inline function with "when" over enum across modules
#KT-6552 Fixed
This commit is contained in:
+1
-1
@@ -47,7 +47,7 @@ public class MappingClassesForWhenByEnumCodegen {
|
||||
cb.defineClass(
|
||||
srcFile,
|
||||
V1_6,
|
||||
ACC_FINAL | ACC_SYNTHETIC,
|
||||
ACC_FINAL | ACC_SYNTHETIC | ACC_PUBLIC,
|
||||
mappingsClass.getInternalName(),
|
||||
null,
|
||||
OBJECT_TYPE.getInternalName(),
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
return switch(X.A) + switch(X.B)
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package test
|
||||
|
||||
public enum class X { A, B }
|
||||
|
||||
public inline fun switch(x: X): String = when (x) {
|
||||
X.A -> "O"
|
||||
X.B -> "K"
|
||||
}
|
||||
+6
@@ -115,6 +115,12 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
|
||||
doTestMultiFileWithInlineCheck(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt6552.1.kt")
|
||||
public void testKt6552() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt6552.1.kt");
|
||||
doTestMultiFileWithInlineCheck(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt8133.1.kt")
|
||||
public void testKt8133() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt8133.1.kt");
|
||||
|
||||
+6
@@ -115,6 +115,12 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
|
||||
doBoxTestWithInlineCheck(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt6552.1.kt")
|
||||
public void testKt6552() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt6552.1.kt");
|
||||
doBoxTestWithInlineCheck(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt8133.1.kt")
|
||||
public void testKt8133() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt8133.1.kt");
|
||||
|
||||
Reference in New Issue
Block a user