Handle index expressions' callee IDs correctly
Some code that handles unary and binary exprs' callee IDs was
forgetting to handle the index expr case (since calls to
user-defined index operators also have callee IDs). This was
manifesting as an ICE in trans because when monomorphizing a
function that had one of these operators in it (an index into a
dvec, in the test case), the callee ID would be unbound to a type.
Fixed it. Closes #2631.
This commit is contained in:
@@ -455,7 +455,7 @@ fn id_visitor(vfn: fn@(node_id)) -> visit::vt<()> {
|
||||
visit_expr: fn@(e: @expr) {
|
||||
vfn(e.id);
|
||||
alt e.node {
|
||||
expr_unary(_, _) | expr_binary(_, _, _) {
|
||||
expr_unary(*) | expr_binary(*) | expr_index(*) {
|
||||
vfn(ast_util::op_expr_callee_id(e));
|
||||
}
|
||||
_ { /* fallthrough */ }
|
||||
|
||||
Reference in New Issue
Block a user