Skip to content

Commit 0b3c30d

Browse files
committed
---
yaml --- r: 3197 b: refs/heads/master c: 753da64 h: refs/heads/master i: 3195: ebe5550 v: v3
1 parent 1e32671 commit 0b3c30d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-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: 1dbc0442cddb0317938a481b7afb7e4113658d78
2+
refs/heads/master: 753da64fd6a98b32602cdfda35d39d36c961c94a

trunk/src/comp/middle/typeck.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1522,7 +1522,12 @@ fn check_expr(&@fn_ctxt fcx, &@ast::expr expr) {
15221522
case (ast::expr_binary(?binop, ?lhs, ?rhs, ?a)) {
15231523
check_expr(fcx, lhs);
15241524
check_expr(fcx, rhs);
1525+
15251526
auto lhs_t = expr_ty(fcx.ccx.tcx, lhs);
1527+
auto rhs_t = expr_ty(fcx.ccx.tcx, rhs);
1528+
1529+
demand::autoderef(fcx, expr.span, lhs_t, rhs_t, AUTODEREF_OK);
1530+
15261531
// FIXME: Binops have a bit more subtlety than this.
15271532

15281533
auto t = strip_boxes(fcx, expr.span, lhs_t);

0 commit comments

Comments
 (0)