simple revursion check in scope
This commit is contained in:
+4
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user