Skip to content

Commit 549a6a5

Browse files
lkupergraydon
authored andcommitted
---
yaml --- r: 2529 b: refs/heads/master c: b6f35c6 h: refs/heads/master i: 2527: 5d62f23 v: v3
1 parent c8b4ec6 commit 549a6a5

File tree

5 files changed

+16
-9
lines changed

5 files changed

+16
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: d3242b9644bb32f9a74be845518067566e2f36a7
2+
refs/heads/master: b6f35c6a4b7b91399e9338fa29d91781f3bf2797

trunk/src/comp/middle/ty.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1659,7 +1659,6 @@ fn pat_ty(&ctxt cx, &node_type_table ntt, &@ast::pat pat) -> t {
16591659
fail; // not reached
16601660
}
16611661

1662-
<<<<<<< HEAD
16631662
fn expr_ann(&@ast::expr e) -> ast::ann {
16641663
alt (e.node) {
16651664
case (ast::expr_vec(_,_,?a)) { ret a; }

trunk/src/comp/middle/typeck.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2592,20 +2592,23 @@ fn check_expr(&@fn_ctxt fcx, &@ast::expr expr) -> @ast::expr {
25922592
auto t = ty::mk_nil(fcx.ccx.tcx);
25932593
let ty::t this_obj_ty;
25942594

2595-
// Grab the type of the current object
25962595
auto this_obj_id = fcx.ccx.this_obj;
25972596
alt (this_obj_id) {
2597+
// If we're inside a current object, grab its type.
25982598
case (some[ast::def_id](?def_id)) {
25992599
this_obj_ty = ty::lookup_item_type(fcx.ccx.sess,
26002600
fcx.ccx.tcx, fcx.ccx.type_cache, def_id)._1;
26012601
}
2602-
case (_) { fail; }
2602+
// Otherwise, we should be able to look up the object we're
2603+
// "with".
2604+
case (_) {
2605+
// TODO.
2606+
2607+
fail;
2608+
}
26032609
}
26042610

2605-
2606-
// Grab this method's type out of the current object type
2607-
2608-
// this_obj_ty is an ty::t
2611+
// Grab this method's type out of the current object type.
26092612
alt (struct(fcx.ccx.tcx, this_obj_ty)) {
26102613
case (ty::ty_obj(?methods)) {
26112614
for (ty::method method in methods) {

trunk/src/comp/middle/walk.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ fn walk_expr(&ast_visitor v, @ast::expr e) {
434434
walk_expr(v, x);
435435
}
436436

437-
case (ast.expr_anon_obj(_,_,_,_)) { }
437+
case (ast::expr_anon_obj(_,_,_,_)) { }
438438
}
439439
v.visit_expr_post(e);
440440
}

trunk/src/comp/pretty/pprust.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,11 @@ fn print_expr(ps s, &@ast::expr expr) {
690690
print_expr(s, expr);
691691
pclose(s);
692692
}
693+
694+
case (ast::expr_anon_obj(_,_,_,_)) {
695+
wrd(s.s, "obj");
696+
// TODO
697+
}
693698
}
694699
end(s.s);
695700
}

0 commit comments

Comments
 (0)