Skip to content

Commit 4367252

Browse files
committed
---
yaml --- r: 994 b: refs/heads/master c: cdcab74 h: refs/heads/master v: v3
1 parent 5b5424a commit 4367252

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
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: df5f8f3e37ca0ebbd2d44d26abbab9dfedb6b088
2+
refs/heads/master: cdcab742a72583d6d59b32952df7c7320efd3bc3

trunk/src/comp/middle/fold.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ fn fold_expr[ENV](&ENV env, ast_fold[ENV] fld, &@expr e) -> @expr {
404404

405405
case (ast.expr_unary(?op, ?a, ?t)) {
406406
auto aa = fold_expr(env_, fld, a);
407-
ret fld.fold_expr_unary(env_, e.span, op, a, t);
407+
ret fld.fold_expr_unary(env_, e.span, op, aa, t);
408408
}
409409

410410
case (ast.expr_lit(?lit, ?t)) {

trunk/src/comp/middle/typeck.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ fn ast_ty_to_ty(ty_getter getter, &@ast.ty ast_ty) -> @ty {
271271

272272
case (ast.ty_path(?path, ?def)) {
273273
auto def_id;
274+
check (def != none[ast.def]);
274275
alt (option.get[ast.def](def)) {
275276
case (ast.def_ty(?id)) { def_id = id; }
276277
case (_) { fail; }
@@ -1247,6 +1248,7 @@ fn check_expr(&fn_ctxt fcx, @ast.expr expr) -> @ast.expr {
12471248

12481249
case (ast.expr_name(?name, ?defopt, _)) {
12491250
auto t = plain_ty(ty_nil);
1251+
check (defopt != none[ast.def]);
12501252
alt (option.get[ast.def](defopt)) {
12511253
case (ast.def_arg(?id)) {
12521254
check (fcx.locals.contains_key(id));

0 commit comments

Comments
 (0)