IR: skip script inner classes in LDL
#KT-49012 fixed
This commit is contained in:
+4
@@ -953,6 +953,8 @@ class LocalDeclarationsLowering(
|
||||
super.visitConstructor(declaration, data)
|
||||
|
||||
if (!isScriptMode && !declaration.constructedClass.isLocalNotInner()) return
|
||||
// Inner classes in scripts are handled properly in the InnerClassesLowering
|
||||
if (isScriptMode && declaration.constructedClass.isInner) return
|
||||
// LDL doesn't work on the enums because local enums are not allowed, so skipping them in scripts too
|
||||
if (isScriptMode && declaration.constructedClass.kind == ClassKind.ENUM_CLASS) return
|
||||
|
||||
@@ -964,6 +966,8 @@ class LocalDeclarationsLowering(
|
||||
super.visitClass(declaration, data.withCurrentClass(declaration))
|
||||
|
||||
if (!isScriptMode && !declaration.isLocalNotInner()) return
|
||||
// Inner classes in scripts are handled properly in the InnerClassesLowering
|
||||
if (isScriptMode && declaration.isInner) return
|
||||
// LDL doesn't work on the enums because local enums are not allowed, so skipping them in scripts too
|
||||
if (isScriptMode && declaration.kind == ClassKind.ENUM_CLASS) return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user