Skip to content

Commit 9fbe2c7

Browse files
committed
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
1 parent 96d5a1d commit 9fbe2c7

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

compiler/frontend/src/org/jetbrains/jet/lang/resolve/scopes/WriteThroughScope.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ public Collection<DeclarationDescriptor> getDeclarationsByLabel(@NotNull LabelNa
5656
@Override
5757
@NotNull
5858
public DeclarationDescriptor getContainingDeclaration() {
59-
checkMayRead();
60-
6159
return writableWorker.getContainingDeclaration();
6260
}
6361

0 commit comments

Comments
 (0)