simple revursion check in scope

This commit is contained in:
Stepan Koltsov
2012-04-07 06:32:19 +04:00
parent 498d444a0a
commit 3ba2aa91fd
@@ -96,6 +96,10 @@ public abstract class WritableScopeWithImports extends JetScopeAdapter implement
@Override
public void importScope(@NotNull JetScope imported) {
if (imported == this) {
throw new IllegalStateException("cannot import scope into self");
}
checkMayWrite();
getImports().add(0, imported);