diff --git a/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Scope.kt b/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Scope.kt index dcff4be..29a5e28 100644 --- a/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Scope.kt +++ b/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Scope.kt @@ -30,7 +30,7 @@ open class Scope( args: Arguments = Arguments.EMPTY, 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")