From 9fbe2c7cbc38bcc15790fc76d13749de513d4606 Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Wed, 2 Apr 2014 20:08:11 +0400 Subject: [PATCH] Minor, remove read check in WriteThroughScope Without this, it's difficult to debug errors related to writing to the already locked scope: if you set a conditional breakpoint in checkMayRead() on a scope's toString(), its toString() will call getContainingDeclaration(), which will call checkMayRead() again, resulting in StackOverflowError --- .../jetbrains/jet/lang/resolve/scopes/WriteThroughScope.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/scopes/WriteThroughScope.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/scopes/WriteThroughScope.java index 81bc6a6bb6d..687c18a948e 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/scopes/WriteThroughScope.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/scopes/WriteThroughScope.java @@ -56,8 +56,6 @@ public class WriteThroughScope extends WritableScopeWithImports { @Override @NotNull public DeclarationDescriptor getContainingDeclaration() { - checkMayRead(); - return writableWorker.getContainingDeclaration(); }