aboutsummaryrefslogtreecommitdiff
path: root/src/comp/middle
diff options
context:
space:
mode:
Diffstat (limited to 'src/comp/middle')
-rw-r--r--src/comp/middle/ty.rs1
-rw-r--r--src/comp/middle/typeck.rs15
-rw-r--r--src/comp/middle/walk.rs2
3 files changed, 10 insertions, 8 deletions
diff --git a/src/comp/middle/ty.rs b/src/comp/middle/ty.rs
index fcde5e2c..75d8f08c 100644
--- a/src/comp/middle/ty.rs
+++ b/src/comp/middle/ty.rs
@@ -1659,7 +1659,6 @@ fn pat_ty(&ctxt cx, &node_type_table ntt, &@ast::pat pat) -> t {
fail; // not reached
}
-<<<<<<< HEAD
fn expr_ann(&@ast::expr e) -> ast::ann {
alt (e.node) {
case (ast::expr_vec(_,_,?a)) { ret a; }
diff --git a/src/comp/middle/typeck.rs b/src/comp/middle/typeck.rs
index 1966cfb2..3ad30848 100644
--- a/src/comp/middle/typeck.rs
+++ b/src/comp/middle/typeck.rs
@@ -2592,20 +2592,23 @@ fn check_expr(&@fn_ctxt fcx, &@ast::expr expr) -> @ast::expr {
auto t = ty::mk_nil(fcx.ccx.tcx);
let ty::t this_obj_ty;
- // Grab the type of the current object
auto this_obj_id = fcx.ccx.this_obj;
alt (this_obj_id) {
+ // If we're inside a current object, grab its type.
case (some[ast::def_id](?def_id)) {
this_obj_ty = ty::lookup_item_type(fcx.ccx.sess,
fcx.ccx.tcx, fcx.ccx.type_cache, def_id)._1;
}
- case (_) { fail; }
+ // Otherwise, we should be able to look up the object we're
+ // "with".
+ case (_) {
+ // TODO.
+
+ fail;
+ }
}
-
- // Grab this method's type out of the current object type
-
- // this_obj_ty is an ty::t
+ // Grab this method's type out of the current object type.
alt (struct(fcx.ccx.tcx, this_obj_ty)) {
case (ty::ty_obj(?methods)) {
for (ty::method method in methods) {
diff --git a/src/comp/middle/walk.rs b/src/comp/middle/walk.rs
index 8dbcca07..fbf3060e 100644
--- a/src/comp/middle/walk.rs
+++ b/src/comp/middle/walk.rs
@@ -434,7 +434,7 @@ fn walk_expr(&ast_visitor v, @ast::expr e) {
walk_expr(v, x);
}
- case (ast.expr_anon_obj(_,_,_,_)) { }
+ case (ast::expr_anon_obj(_,_,_,_)) { }
}
v.visit_expr_post(e);
}