Skip to content

Commit 86a3aaa

Browse files
committed
---
yaml --- r: 1103 b: refs/heads/master c: a6c6e86 h: refs/heads/master i: 1101: c650dbc 1099: 1c51182 1095: 99823dd 1087: 0ed4ce3 v: v3
1 parent b586c49 commit 86a3aaa

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
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: 680e858d612fe9da436194dacdf2987ece9ada03
2+
refs/heads/master: a6c6e8679e2a04624be710c00828bd59d1f4cc3b

trunk/src/comp/middle/typeck.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1767,7 +1767,7 @@ fn check_expr(&fn_ctxt fcx, @ast.expr expr) -> @ast.expr {
17671767
}
17681768
case (ast.def_fn(?id)) {
17691769
check (fcx.ccx.item_types.contains_key(id));
1770-
t = fcx.ccx.item_types.get(id);
1770+
t = generalize_ty(fcx.ccx, fcx.ccx.item_types.get(id));
17711771
}
17721772
case (ast.def_const(?id)) {
17731773
check (fcx.ccx.item_types.contains_key(id));
@@ -1783,7 +1783,7 @@ fn check_expr(&fn_ctxt fcx, @ast.expr expr) -> @ast.expr {
17831783
}
17841784
case (ast.def_obj(?id)) {
17851785
check (fcx.ccx.item_types.contains_key(id));
1786-
t = fcx.ccx.item_types.get(id);
1786+
t = generalize_ty(fcx.ccx, fcx.ccx.item_types.get(id));
17871787
}
17881788

17891789
case (_) {
@@ -1794,8 +1794,6 @@ fn check_expr(&fn_ctxt fcx, @ast.expr expr) -> @ast.expr {
17941794
}
17951795
}
17961796

1797-
t = generalize_ty(fcx.ccx, t);
1798-
17991797
ret @fold.respan[ast.expr_](expr.span,
18001798
ast.expr_name(name, defopt,
18011799
ast.ann_type(t)));

0 commit comments

Comments
 (0)