[LL FIR] fix status resolution of static enum members

Before, BODY_RESOLVE phase were used for them but status may be unresolved.
This caused CCE on accessing resolved status for such static enum members.

Now, those declarations are created with the status of owning enum as the status is taken from that class.
This commit is contained in:
Ilya Kirillov
2022-11-15 18:59:41 +01:00
committed by teamcity
parent 84650d08af
commit 8dab560d6e
4 changed files with 56 additions and 53 deletions
@@ -245,6 +245,7 @@ abstract class FirJavaFacade(
val classIsAnnotation = javaClass.classKind == ClassKind.ANNOTATION_CLASS
val moduleData = getModuleDataForClass(javaClass)
return buildJavaClass {
resolvePhase = FirResolvePhase.BODY_RESOLVE
source = javaClass.toSourceElement()
this.moduleData = moduleData
symbol = classSymbol