xo-expression: bugfix: ensure in-layer uniqueness of vars
This commit is contained in:
parent
a76c835477
commit
f18c33b249
2 changed files with 9 additions and 2 deletions
|
|
@ -25,6 +25,11 @@ namespace xo {
|
|||
return new Variable(name, var_type);
|
||||
}
|
||||
|
||||
/** return copy of x: same var, different object identity **/
|
||||
static ref::rp<Variable> copy(ref::brw<Variable> x) {
|
||||
return new Variable(x->name(), x->valuetype());
|
||||
}
|
||||
|
||||
/** downcast from Expression **/
|
||||
static ref::brw<Variable> from(ref::brw<Expression> x) {
|
||||
return ref::brw<Variable>::from(x);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue