Skip to content

Commit 0e98e64

Browse files
committed
Add more item types to the ast_map so the test suite can build with debug info.
1 parent 1dec1c8 commit 0e98e64

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/comp/middle/ast_map.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,14 @@ fn map_native_item(cx: ctx, i: @native_item) {
8888

8989
fn map_expr(cx: ctx, ex: @expr) {
9090
cx.map.insert(ex.id, node_expr(ex));
91+
alt ex.node {
92+
expr_anon_obj(ao) {
93+
for m in ao.methods {
94+
cx.map.insert(m.id, node_obj_method(m));
95+
}
96+
}
97+
_ {}
98+
}
9199
}
92100

93101
fn new_smallintmap_int_adapter<copy V>() -> std::map::hashmap<int, V> {

src/comp/middle/debuginfo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ fn create_function(fcx: @fn_ctxt) -> @metadata<subprogram_md> {
726726
}
727727
}
728728
}
729-
ast_map::node_obj_method(method) {
729+
ast_map::node_obj_method(method) | ast_map::node_method(method) {
730730
(method.ident, method.decl.output, method.id)
731731
}
732732
ast_map::node_res_ctor(item) {

0 commit comments

Comments
 (0)