each new scope with no parent now starts with a copy of import manager to isolate its imports

This commit is contained in:
Sergey Chernov 2025-07-10 12:42:39 +03:00
parent 9771b40c98
commit 30b6ef235b

View File

@ -30,7 +30,7 @@ open class Scope(
args: Arguments = Arguments.EMPTY, args: Arguments = Arguments.EMPTY,
pos: Pos = Pos.builtIn, pos: Pos = Pos.builtIn,
) )
: this(Script.defaultImportManager.newModuleAt(pos), args, pos) : this(Script.defaultImportManager.copy().newModuleAt(pos), args, pos)
fun raiseNotImplemented(what: String = "operation"): Nothing = raiseError("$what is not implemented") fun raiseNotImplemented(what: String = "operation"): Nothing = raiseError("$what is not implemented")