about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2012-06-15 14:55:03 -0700
committerTim Chevalier <chevalier@alum.wellesley.edu>2012-06-15 15:21:17 -0700
commit093faaabe115c43a09c8565f572fb03d81256a3a (patch)
tree999a37a3fa9c52e3afb7eefe1fd2b885fd267d1b /src/libsyntax
parent7a253eabce740bfa9e558d41adda784642617b6d (diff)
downloadrust-093faaabe115c43a09c8565f572fb03d81256a3a.tar.gz
rust-093faaabe115c43a09c8565f572fb03d81256a3a.zip
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.
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ast_util.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/ast_util.rs b/src/libsyntax/ast_util.rs
index ef3b0332f19..f76382cb0d6 100644
--- a/src/libsyntax/ast_util.rs
+++ b/src/libsyntax/ast_util.rs
@@ -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 */ }