Skip to content

Commit 82c3bf9

Browse files
committed
---
yaml --- r: 962 b: refs/heads/master c: 7e2f205 h: refs/heads/master v: v3
1 parent 900c418 commit 82c3bf9

File tree

2 files changed

+12
-1
lines changed

2 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: 416d9bc0fd20c87dc4ed96e2018156e65fea1e2b
2+
refs/heads/master: 7e2f2058660ecf0819eee09319d314b3343a03fc

trunk/src/comp/middle/typeck.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,13 @@ fn ast_ty_to_ty(ty_getter getter, &@ast.ty ast_ty) -> @ty {
225225
case (ast.ty_str) { sty = ty_str; }
226226
case (ast.ty_box(?t)) { sty = ty_box(ast_ty_to_ty(getter, t)); }
227227
case (ast.ty_vec(?t)) { sty = ty_vec(ast_ty_to_ty(getter, t)); }
228+
case (ast.ty_tup(?fields)) {
229+
let vec[tup(bool,@ty)] flds = vec();
230+
for (tup(bool, @ast.ty) field in fields) {
231+
flds += tup(field._0, ast_ty_to_ty(getter, field._1));
232+
}
233+
sty = ty_tup(flds);
234+
}
228235

229236
case (ast.ty_fn(?inputs, ?output)) {
230237
auto f = bind ast_arg_to_arg(getter, _);
@@ -244,6 +251,10 @@ fn ast_ty_to_ty(ty_getter getter, &@ast.ty ast_ty) -> @ty {
244251
sty = getter(def_id).struct;
245252
cname = some(path_to_str(path));
246253
}
254+
255+
case (_) {
256+
fail;
257+
}
247258
}
248259

249260
ret @rec(struct=sty, cname=cname);

0 commit comments

Comments
 (0)