Skip to content

Commit 5d4c812

Browse files
committed
---
yaml --- r: 958 b: refs/heads/master c: 092af6f h: refs/heads/master v: v3
1 parent eb370c0 commit 5d4c812

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-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: cffdb66aa42b6c5a1d30a1b4364d65f409976202
2+
refs/heads/master: 092af6fb764207693a01bb37ce4e38ddb8010e1e

trunk/src/comp/middle/typeck.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,6 +1200,21 @@ fn check_expr(&fn_ctxt fcx, @ast.expr expr) -> @ast.expr {
12001200
ast.ann_type(t_1)));
12011201
}
12021202

1203+
case (ast.expr_tup(?args, _)) {
1204+
let vec[tup(bool, @ast.expr)] args_1 = vec();
1205+
let vec[tup(bool, @ty)] args_t = vec();
1206+
1207+
for (tup(bool, @ast.expr) arg in args) {
1208+
auto expr_1 = check_expr(fcx, arg._1);
1209+
args_1 += tup(arg._0, expr_1);
1210+
args_t += tup(arg._0, expr_ty(expr_1));
1211+
}
1212+
1213+
auto ann = ast.ann_type(plain_ty(ty_tup(args_t)));
1214+
ret @fold.respan[ast.expr_](expr.span,
1215+
ast.expr_tup(args_1, ann));
1216+
}
1217+
12031218
case (_) {
12041219
// TODO
12051220
ret expr;

0 commit comments

Comments
 (0)