rustc: Pull the type out of the correct expression when typechecking channel types. Puts out burning tinderbox.

This commit is contained in:
Patrick Walton 2011-05-17 18:19:45 -07:00
parent 83e1dc63c2
commit 8637a4eaf3

View file

@ -2515,7 +2515,7 @@ fn check_expr(&@fn_ctxt fcx, &@ast::expr expr) {
case (ast::expr_chan(?x, ?a)) {
check_expr(fcx, x);
auto port_t = expr_ty(fcx.ccx.tcx, fcx.ccx.node_types, expr);
auto port_t = expr_ty(fcx.ccx.tcx, fcx.ccx.node_types, x);
alt (struct(fcx.ccx.tcx, port_t)) {
case (ty::ty_port(?subtype)) {
auto ct = ty::mk_chan(fcx.ccx.tcx, subtype);