Obliterate the callee_id hack
Exprs that could be applications of overloaded operators (expr_unary, expr_binary, expr_index) relied on the previous node ID being "reserved" to carry extra typechecking info. This was incredibly error-prone. Fixed it; now all exprs have two node IDs (which will be wasted in some cases; future work could make this an option instead if the extra int field ends up being a performance problem). Closes #2804
This commit is contained in:
@@ -688,6 +688,7 @@ impl of ast_fold for ast_fold_precursor {
|
||||
fn fold_expr(&&x: @expr) -> @expr {
|
||||
let (n, s) = self.fold_expr(x.node, x.span, self as ast_fold);
|
||||
ret @{id: self.new_id(x.id),
|
||||
callee_id: self.new_id(x.callee_id),
|
||||
node: n,
|
||||
span: self.new_span(s)};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user