6c6cf9977b
In the compiler, 'FirLazyDeclarationResolver' assumes 'lazyResolveToPhase()' appear only during code analysis. So there is a check that requires calls to be wrapped with 'startResolvingPhase()' and 'finishResolvingPhase()'. Checkers and backend are run on fully analyzed code, so there is no need in calling 'lazyResolveToPhase()' in the first place. In the IDE, however, it's impossible to analyze all code in a project before running the backend. Generally, it's not a problem as files that are explicitly passed to the backend go through all FIR phases. 'IrBuiltInsOverFir', though, perform symbol lookups, so unresolved-yet declarations might appear.