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()) {