Skip to content

Commit 46c2981

Browse files
brsongraydon
authored andcommitted
---
yaml --- r: 1642 b: refs/heads/master c: 83f758c h: refs/heads/master v: v3
1 parent 615121e commit 46c2981

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-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: a309f74a94f99127cf0667999d4080450bb62491
2+
refs/heads/master: 83f758cf0dfaefc2ebb3a26404e8a9e009847af7

trunk/src/comp/middle/typeck.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1830,6 +1830,22 @@ fn check_expr(&@fn_ctxt fcx, @ast.expr expr) -> @ast.expr {
18301830
ret @fold.respan[ast.expr_](expr.span, newexpr);
18311831
}
18321832

1833+
case (ast.expr_send(?lhs, ?rhs, _)) {
1834+
auto checked = check_assignment_like(fcx, lhs, rhs);
1835+
auto newexpr = ast.expr_send(checked._0,
1836+
checked._1,
1837+
checked._2);
1838+
ret @fold.respan[ast.expr_](expr.span, newexpr);
1839+
}
1840+
1841+
case (ast.expr_recv(?lhs, ?rhs, _)) {
1842+
auto checked = check_assignment_like(fcx, lhs, rhs);
1843+
auto newexpr = ast.expr_recv(checked._0,
1844+
checked._1,
1845+
checked._2);
1846+
ret @fold.respan[ast.expr_](expr.span, newexpr);
1847+
}
1848+
18331849
case (ast.expr_if(?cond, ?thn, ?elifs, ?elsopt, _)) {
18341850
auto cond_0 = check_expr(fcx, cond);
18351851
auto cond_1 = demand_expr(fcx, plain_ty(ty.ty_bool), cond_0);

0 commit comments

Comments
 (0)