diff options
Diffstat (limited to 'node/DeclNode.cc')
| -rw-r--r-- | node/DeclNode.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/node/DeclNode.cc b/node/DeclNode.cc index 4d2f8aa..d22c847 100644 --- a/node/DeclNode.cc +++ b/node/DeclNode.cc @@ -75,9 +75,9 @@ TypeDeclNode::TypeDeclNode(Context* context, VariableList* scope, , decls_(std::move(decls)) {} Value TypeDeclNode::CodeGen() { - scope_ = (scope_ == nullptr ? context_->GetGlobals() : scope_); + VariableList* scope = (scope_ == nullptr ? context_->GetGlobals() : scope_); for (auto&& decl : decls_) { - scope_->AddTypeAlias(std::get<0>(decl), std::get<1>(decl)->GetType()); + scope->AddTypeAlias(std::get<0>(decl), std::get<1>(decl)->GetType()); } return nullptr; } |
