Do not weakly retain caches whose computation has side-effects
Lazy scopes write REFERENCE_TARGET to trace as a side-effect, when weak caches are cleared, resolution may be repeated, and a rewrite error happens
This commit is contained in:
@@ -47,7 +47,7 @@ public class ScopeProvider {
|
||||
public ScopeProvider(@NotNull ResolveSession resolveSession) {
|
||||
this.resolveSession = resolveSession;
|
||||
|
||||
this.fileScopes = resolveSession.getStorageManager().createWeaklyRetainedMemoizedFunction(new Function1<JetFile, JetScope>() {
|
||||
this.fileScopes = resolveSession.getStorageManager().createMemoizedFunction(new Function1<JetFile, JetScope>() {
|
||||
@Override
|
||||
public JetScope invoke(@NotNull JetFile file) {
|
||||
return createFileScope(file);
|
||||
|
||||
Reference in New Issue
Block a user