[LL FIR] FileStructure: resolve FirFile to body phase as all other elements
This is the correct behavior as we have to resolve to body phase to build CFG and run diagnostics collector correctly ^KT-65780 Fixed
This commit is contained in:
committed by
Space Team
parent
84b6d5d508
commit
7796ef43db
+1
-2
@@ -199,8 +199,7 @@ internal class FileStructure private constructor(
|
||||
}
|
||||
container is KtFile -> {
|
||||
val firFile = moduleComponents.firFileBuilder.buildRawFirFileWithCaching(ktFile)
|
||||
firFile.lazyResolveToPhase(FirResolvePhase.IMPORTS)
|
||||
firFile.annotationsContainer?.lazyResolveToPhase(FirResolvePhase.BODY_RESOLVE)
|
||||
firFile.lazyResolveToPhase(FirResolvePhase.BODY_RESOLVE)
|
||||
|
||||
RootStructureElement(firFile, moduleComponents)
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,6 +6,6 @@ FIR element rendered:
|
||||
@FILE:R|kotlin/Suppress|[Types](names = vararg(String()))
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] fileAnnotation.kt
|
||||
FILE: [ResolvedTo(BODY_RESOLVE)] fileAnnotation.kt
|
||||
@FILE:R|kotlin/Suppress|[Types](names = vararg(String()))
|
||||
[ResolvedTo(BODY_RESOLVE)] annotations container
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ FIR element rendered:
|
||||
@FILE:R|kotlin/Suppress|[Types](names = vararg(String()))
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] fileAnnotationScript.kts
|
||||
FILE: [ResolvedTo(BODY_RESOLVE)] fileAnnotationScript.kts
|
||||
@FILE:R|kotlin/Suppress|[Types](names = vararg(String()))
|
||||
[ResolvedTo(BODY_RESOLVE)] annotations container
|
||||
context(<script>@kotlin.script.templates.standard.ScriptTemplateWithArgs)
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ FIR element rendered:
|
||||
@FILE:R|Ann|[Types]()
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] file.kt
|
||||
FILE: [ResolvedTo(BODY_RESOLVE)] file.kt
|
||||
@FILE:R|Ann|[Types]()
|
||||
[ResolvedTo(BODY_RESOLVE)] annotations container
|
||||
public final [ResolvedTo(STATUS)] annotation class Ann : R|kotlin/Annotation| {
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ FIR element rendered:
|
||||
@FILE:R|Ann|[Types]()
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] fileScript.kts
|
||||
FILE: [ResolvedTo(BODY_RESOLVE)] fileScript.kts
|
||||
@FILE:R|Ann|[Types]()
|
||||
[ResolvedTo(BODY_RESOLVE)] annotations container
|
||||
context(<script>@kotlin.script.templates.standard.ScriptTemplateWithArgs)
|
||||
|
||||
+1
-1
@@ -6,4 +6,4 @@ FIR element rendered:
|
||||
import a.b.c
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] firstImportNamePart.kt
|
||||
FILE: [ResolvedTo(BODY_RESOLVE)] firstImportNamePart.kt
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ FIR element rendered:
|
||||
import a.b.c
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] firstImportNamePartScript.kts
|
||||
FILE: [ResolvedTo(BODY_RESOLVE)] firstImportNamePartScript.kts
|
||||
context(<script>@kotlin.script.templates.standard.ScriptTemplateWithArgs)
|
||||
SCRIPT: [ResolvedTo(RAW_FIR)] <script-firstImportNamePartScript.kts>
|
||||
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|
|
||||
|
||||
+1
-1
@@ -6,4 +6,4 @@ FIR element rendered:
|
||||
import a.b.c
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] middleImportNamePart.kt
|
||||
FILE: [ResolvedTo(BODY_RESOLVE)] middleImportNamePart.kt
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ FIR element rendered:
|
||||
import a.b.c
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] middleImportNamePartScript.kts
|
||||
FILE: [ResolvedTo(BODY_RESOLVE)] middleImportNamePartScript.kts
|
||||
context(<script>@kotlin.script.templates.standard.ScriptTemplateWithArgs)
|
||||
SCRIPT: [ResolvedTo(RAW_FIR)] <script-middleImportNamePartScript.kts>
|
||||
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|
|
||||
|
||||
+1
-1
@@ -6,4 +6,4 @@ FIR element rendered:
|
||||
import a.b.c
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] qualifiedImportNamePart.kt
|
||||
FILE: [ResolvedTo(BODY_RESOLVE)] qualifiedImportNamePart.kt
|
||||
|
||||
Vendored
+1
-1
@@ -6,7 +6,7 @@ FIR element rendered:
|
||||
import a.b.c
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] qualifiedImportNamePartScript.kts
|
||||
FILE: [ResolvedTo(BODY_RESOLVE)] qualifiedImportNamePartScript.kts
|
||||
context(<script>@kotlin.script.templates.standard.ScriptTemplateWithArgs)
|
||||
SCRIPT: [ResolvedTo(RAW_FIR)] <script-qualifiedImportNamePartScript.kts>
|
||||
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|
|
||||
|
||||
+1
-1
@@ -6,4 +6,4 @@ FIR element rendered:
|
||||
import a.b.c
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] wholeImportDirective.kt
|
||||
FILE: [ResolvedTo(BODY_RESOLVE)] wholeImportDirective.kt
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ FIR element rendered:
|
||||
import a.b.c
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] wholeImportDirectiveScript.kts
|
||||
FILE: [ResolvedTo(BODY_RESOLVE)] wholeImportDirectiveScript.kts
|
||||
context(<script>@kotlin.script.templates.standard.ScriptTemplateWithArgs)
|
||||
SCRIPT: [ResolvedTo(RAW_FIR)] <script-wholeImportDirectiveScript.kts>
|
||||
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|
|
||||
|
||||
+1
-1
@@ -6,4 +6,4 @@ FIR element rendered:
|
||||
import a.b.c
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] wholeImportName.kt
|
||||
FILE: [ResolvedTo(BODY_RESOLVE)] wholeImportName.kt
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ FIR element rendered:
|
||||
import a.b.c
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] wholeImportNameScript.kts
|
||||
FILE: [ResolvedTo(BODY_RESOLVE)] wholeImportNameScript.kts
|
||||
context(<script>@kotlin.script.templates.standard.ScriptTemplateWithArgs)
|
||||
SCRIPT: [ResolvedTo(RAW_FIR)] <script-wholeImportNameScript.kts>
|
||||
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|
|
||||
|
||||
+1
-1
@@ -6,5 +6,5 @@ FIR element rendered:
|
||||
package a.b.c
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] firstPackageNamePart.kt
|
||||
FILE: [ResolvedTo(BODY_RESOLVE)] firstPackageNamePart.kt
|
||||
package a.b.c
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ FIR element rendered:
|
||||
package a.b.c
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] firstPackageNamePartScript.kts
|
||||
FILE: [ResolvedTo(BODY_RESOLVE)] firstPackageNamePartScript.kts
|
||||
package a.b.c
|
||||
|
||||
context(<script>@kotlin.script.templates.standard.ScriptTemplateWithArgs)
|
||||
|
||||
+1
-1
@@ -6,5 +6,5 @@ FIR element rendered:
|
||||
package a.b.c
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] middlePackageNamePart.kt
|
||||
FILE: [ResolvedTo(BODY_RESOLVE)] middlePackageNamePart.kt
|
||||
package a.b.c
|
||||
|
||||
Vendored
+1
-1
@@ -6,7 +6,7 @@ FIR element rendered:
|
||||
package a.b.c
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] middlePackageNamePartScript.kts
|
||||
FILE: [ResolvedTo(BODY_RESOLVE)] middlePackageNamePartScript.kts
|
||||
package a.b.c
|
||||
|
||||
context(<script>@kotlin.script.templates.standard.ScriptTemplateWithArgs)
|
||||
|
||||
+1
-1
@@ -6,5 +6,5 @@ FIR element rendered:
|
||||
package a.b.c
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] qualifiedPackageNamePart.kt
|
||||
FILE: [ResolvedTo(BODY_RESOLVE)] qualifiedPackageNamePart.kt
|
||||
package a.b.c
|
||||
|
||||
Vendored
+1
-1
@@ -6,7 +6,7 @@ FIR element rendered:
|
||||
package a.b.c
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] qualifiedPackageNamePartScript.kts
|
||||
FILE: [ResolvedTo(BODY_RESOLVE)] qualifiedPackageNamePartScript.kts
|
||||
package a.b.c
|
||||
|
||||
context(<script>@kotlin.script.templates.standard.ScriptTemplateWithArgs)
|
||||
|
||||
+1
-1
@@ -6,5 +6,5 @@ FIR element rendered:
|
||||
package a.b.c
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] wholePackageDirective.kt
|
||||
FILE: [ResolvedTo(BODY_RESOLVE)] wholePackageDirective.kt
|
||||
package a.b.c
|
||||
|
||||
Vendored
+1
-1
@@ -6,7 +6,7 @@ FIR element rendered:
|
||||
package a.b.c
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] wholePackageDirectiveScript.kts
|
||||
FILE: [ResolvedTo(BODY_RESOLVE)] wholePackageDirectiveScript.kts
|
||||
package a.b.c
|
||||
|
||||
context(<script>@kotlin.script.templates.standard.ScriptTemplateWithArgs)
|
||||
|
||||
+1
-1
@@ -6,5 +6,5 @@ FIR element rendered:
|
||||
package a.b.c
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] wholePackageName.kt
|
||||
FILE: [ResolvedTo(BODY_RESOLVE)] wholePackageName.kt
|
||||
package a.b.c
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ FIR element rendered:
|
||||
package a.b.c
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] wholePackageNameScript.kts
|
||||
FILE: [ResolvedTo(BODY_RESOLVE)] wholePackageNameScript.kts
|
||||
package a.b.c
|
||||
|
||||
context(<script>@kotlin.script.templates.standard.ScriptTemplateWithArgs)
|
||||
|
||||
+1
-1
@@ -7,6 +7,6 @@ FIR element rendered:
|
||||
[ResolvedTo(BODY_RESOLVE)] annotations container
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] fileAnnotationList.kt
|
||||
FILE: [ResolvedTo(BODY_RESOLVE)] fileAnnotationList.kt
|
||||
@FILE:R|kotlin/Suppress|[Types](names = vararg(String()))
|
||||
[ResolvedTo(BODY_RESOLVE)] annotations container
|
||||
|
||||
Vendored
+1
-1
@@ -7,7 +7,7 @@ FIR element rendered:
|
||||
[ResolvedTo(BODY_RESOLVE)] annotations container
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] fileAnnotationListScript.kts
|
||||
FILE: [ResolvedTo(BODY_RESOLVE)] fileAnnotationListScript.kts
|
||||
@FILE:R|kotlin/Suppress|[Types](names = vararg(String()))
|
||||
[ResolvedTo(BODY_RESOLVE)] annotations container
|
||||
context(<script>@kotlin.script.templates.standard.ScriptTemplateWithArgs)
|
||||
|
||||
Reference in New Issue
Block a user