Skip to content

Commit 99dd587

Browse files
committed
---
yaml --- r: 3813 b: refs/heads/master c: 9427864 h: refs/heads/master i: 3811: 34e8a77 v: v3
1 parent 21040e6 commit 99dd587

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
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: 79ce5a46141f05dc454f90cb0be50e081d72e461
2+
refs/heads/master: 9427864f332318e1effaebac064af8d31d7dbf3e

trunk/src/comp/middle/typeck.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1877,6 +1877,7 @@ fn check_expr(&@fn_ctxt fcx, &@ast::expr expr) {
18771877
fcx.ccx.tcx.sess.span_fatal(expr.span,s);
18781878
}
18791879
}
1880+
demand::simple(fcx, expr.span, chan_t, lhs_t);
18801881
write::ty_only_fixup(fcx, id, chan_t);
18811882
}
18821883
case (ast::expr_recv(?lhs, ?rhs)) {
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// xfail-stage0
2+
// tests that ctrl's type gets inferred properly
3+
type command[K, V] = rec(K key, V val);
4+
5+
fn cache_server[K, V] (chan[chan[command[K,V]]] c) {
6+
auto ctrl = port();
7+
c <| chan(ctrl);
8+
}
9+
fn main() {
10+
}

0 commit comments

Comments
 (0)