Supported enums in LocalDeclarationsLowering
This commit is contained in:
+9
@@ -87,6 +87,15 @@ class LocalDeclarationsLowering(
|
||||
is IrProperty -> LocalDeclarationsTransformer(memberDeclaration).lowerLocalDeclarations()
|
||||
is IrField -> LocalDeclarationsTransformer(memberDeclaration).lowerLocalDeclarations()
|
||||
is IrAnonymousInitializer -> LocalDeclarationsTransformer(memberDeclaration).lowerLocalDeclarations()
|
||||
is IrEnumEntry -> {
|
||||
// The responsibility of pulling up classes for enum entries is on EnumClassLowering.
|
||||
// Moreover, EnumClassLowering needs information whether a enum entry has its own class or not.
|
||||
val correspondingClass = memberDeclaration.correspondingClass
|
||||
memberDeclaration.correspondingClass = null
|
||||
LocalDeclarationsTransformer(memberDeclaration).lowerLocalDeclarations().also {
|
||||
memberDeclaration.correspondingClass = correspondingClass
|
||||
}
|
||||
}
|
||||
// TODO: visit children as well
|
||||
else -> null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user