From 8637a4eaf389a1609389d143c385a4a328e3aa84 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Tue, 17 May 2011 18:19:45 -0700 Subject: [PATCH] rustc: Pull the type out of the correct expression when typechecking channel types. Puts out burning tinderbox. --- src/comp/middle/typeck.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/comp/middle/typeck.rs b/src/comp/middle/typeck.rs index 37d9d6704dd9..c6321ffd9690 100644 --- a/src/comp/middle/typeck.rs +++ b/src/comp/middle/typeck.rs @@ -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);