simple revursion check in scope
This commit is contained in:
+4
@@ -96,6 +96,10 @@ public abstract class WritableScopeWithImports extends JetScopeAdapter implement
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void importScope(@NotNull JetScope imported) {
|
public void importScope(@NotNull JetScope imported) {
|
||||||
|
if (imported == this) {
|
||||||
|
throw new IllegalStateException("cannot import scope into self");
|
||||||
|
}
|
||||||
|
|
||||||
checkMayWrite();
|
checkMayWrite();
|
||||||
|
|
||||||
getImports().add(0, imported);
|
getImports().add(0, imported);
|
||||||
|
|||||||
Reference in New Issue
Block a user