b75024e3e0
Before this change, when somebody has requested the exact light class we also store LazyJvmDiagnostic for it in a map inside DiagnosticHolder. The problem is that LazyJvmDiagnostic retains a lot of memory: GenerationState, bindingContext, etc. At the same time, it commonly happens that light classes are being computed from Java resolve and diagnostics are obviously unnecessary there. The solution has two parts: 1. We don't retain diagnostics until somebody explicitly requested them 2. We force computation of LazyJvmDiagnostic to avoid retaining backend's parts The solution has a kind of drawback: for an opened in editor Kotlin file, we'll run back-end twice for contained classes (analysis parts should be reused, though) #KT-24048 Fixed