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
|
|
@ -103,9 +103,11 @@ namespace xo {
|
|||
|
||||
auto ix = var_map.find(var->name());
|
||||
if (ix == var_map.end()) {
|
||||
/* add to var_map */
|
||||
/* add to var_map, copy to ensure Variable
|
||||
* is unique to layer
|
||||
*/
|
||||
|
||||
var_map[var->name()] = var.get();
|
||||
var_map[var->name()] = Variable::copy(var);
|
||||
|
||||
return var.get();
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue