From 0829f965bea0fe1da499031a0e91d2347d981110 Mon Sep 17 00:00:00 2001 From: VaclavT Date: Mon, 3 May 2021 18:30:01 +0200 Subject: [PATCH] setX starts searching in current scope --- ml.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ml.cpp b/ml.cpp index edf3e3a..dcd82f7 100644 --- a/ml.cpp +++ b/ml.cpp @@ -655,7 +655,7 @@ void MlEnvironment::set(const std::string &name, MlValue value) { void MlEnvironment::setX(const std::string &name, MlValue value) { - MlEnvironment* e = this->parent_scope; // we start above this scope for set! + MlEnvironment* e = this; while (e != nullptr) { std::map::const_iterator itr = e->defs.find(name); if (itr != e->defs.end()) {