KTIJ-27879 [AA] Enforce lazy resolve of code fragments in ContextCollector
Without it, the lazy body of code fragment is not properly resolved and cannot be analyzed Use the correct function from `BodyResolveContext` to take the scopes from code fragment into account ^KTIJ-27879 Fixed
This commit is contained in:
committed by
Space Team
parent
8eefb210f9
commit
347d51c90e
+8
@@ -332,6 +332,14 @@ private class ContextCollectorVisitor(
|
||||
}
|
||||
}
|
||||
|
||||
override fun visitCodeFragment(codeFragment: FirCodeFragment) {
|
||||
codeFragment.lazyResolveToPhase(FirResolvePhase.BODY_RESOLVE)
|
||||
|
||||
context.withCodeFragment(codeFragment, holder) {
|
||||
super.visitCodeFragment(codeFragment)
|
||||
}
|
||||
}
|
||||
|
||||
override fun visitAnnotationCall(annotationCall: FirAnnotationCall) {
|
||||
dumpContext(annotationCall, ContextKind.SELF)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user