xo-reader2: bugfix in DDefineExpr
This commit is contained in:
parent
da0d736946
commit
5dc510694c
1 changed files with 5 additions and 1 deletions
|
|
@ -24,9 +24,13 @@ namespace xo {
|
||||||
void * mem = mm.alloc(typeseq::id<DDefineExpr>(),
|
void * mem = mm.alloc(typeseq::id<DDefineExpr>(),
|
||||||
sizeof(DDefineExpr));
|
sizeof(DDefineExpr));
|
||||||
|
|
||||||
|
TypeRef rhs_tref;
|
||||||
|
if (rhs_expr)
|
||||||
|
rhs_tref = rhs_expr.typeref();
|
||||||
|
|
||||||
auto lhs_var = DVariable::make(mm,
|
auto lhs_var = DVariable::make(mm,
|
||||||
lhs_name,
|
lhs_name,
|
||||||
rhs_expr.typeref());
|
rhs_tref);
|
||||||
|
|
||||||
return new (mem) DDefineExpr(lhs_var, rhs_expr);
|
return new (mem) DDefineExpr(lhs_var, rhs_expr);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue