summaryrefslogtreecommitdiff
path: root/src/expr/expr_template.cpp
diff options
context:
space:
mode:
authorTim King <taking@google.com>2017-03-16 14:06:17 -0700
committerTim King <taking@google.com>2017-03-16 14:06:17 -0700
commitafe84522b87b6fc0ad5d0e9a396b61f7b523f674 (patch)
treeaaeef8f32b64b37438b227af5cf6706910862c27 /src/expr/expr_template.cpp
parente4fde716f0b8266412cb6dc6326642c718839b71 (diff)
Fixes bug 781. Copy constructor for Expr needed to set the NodeManagerScope.
Diffstat (limited to 'src/expr/expr_template.cpp')
-rw-r--r--src/expr/expr_template.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/expr/expr_template.cpp b/src/expr/expr_template.cpp
index dad437bc6..4fbb0cd33 100644
--- a/src/expr/expr_template.cpp
+++ b/src/expr/expr_template.cpp
@@ -82,16 +82,22 @@ Expr TypeCheckingException::getExpression() const throw() {
Expr::Expr() :
d_node(new Node),
d_exprManager(NULL) {
+ // We do not need to wrap this in an ExprManagerScope as `new Node` is backed
+ // by NodeValue::null which is a static outside of a NodeManager.
}
Expr::Expr(ExprManager* em, Node* node) :
d_node(node),
d_exprManager(em) {
+ // We do not need to wrap this in an ExprManagerScope as this only initializes
+ // pointers
}
Expr::Expr(const Expr& e) :
- d_node(new Node(*e.d_node)),
+ d_node(NULL),
d_exprManager(e.d_exprManager) {
+ ExprManagerScope ems(*this);
+ d_node = new Node(*e.d_node);
}
Expr::~Expr() {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback