Skip to content

Commit 2c5f5af

Browse files
committed
---
yaml --- r: 5169 b: refs/heads/master c: 1339d05 h: refs/heads/master i: 5167: b7069b4 v: v3
1 parent ab5e988 commit 2c5f5af

File tree

2 files changed

+22
-14
lines changed

2 files changed

+22
-14
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: f3edf8dd5e83544d769b5deb9eb1d391f8f826ee
2+
refs/heads/master: 1339d0543407d653842503704642fb34f8e6a82d

trunk/src/comp/middle/typeck.rs

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2055,19 +2055,27 @@ fn check_expr_with_unifier(fcx: &@fn_ctxt, expr: &@ast::expr, unify: &unifier,
20552055
bot = check_call_or_bind(fcx, expr.span, f, args, kind_bind);
20562056

20572057
// Pull the argument and return types out.
2058-
let (proto, arg_tys, rt, cf, constrs) =
2059-
alt structure_of(fcx, expr.span, expr_ty(tcx, f)) {
2060-
// FIXME:
2061-
// probably need to munge the constrs to drop constraints
2062-
// for any bound args
2063-
ty::ty_fn(proto, arg_tys, rt, cf, constrs) {
2064-
(proto, arg_tys, rt, cf, constrs)
2065-
}
2066-
ty::ty_native_fn(_, arg_tys, rt) {
2067-
(ast::proto_fn, arg_tys, rt, ast::return, [])
2068-
}
2069-
_ { fail "LHS of bind expr didn't have a function type?!"; }
2070-
};
2058+
let proto, arg_tys, rt, cf, constrs;
2059+
alt structure_of(fcx, expr.span, expr_ty(tcx, f)) {
2060+
// FIXME:
2061+
// probably need to munge the constrs to drop constraints
2062+
// for any bound args
2063+
ty::ty_fn(proto_, arg_tys_, rt_, cf_, constrs_) {
2064+
proto = proto_;
2065+
arg_tys = arg_tys_;
2066+
rt = rt_;
2067+
cf = cf_;
2068+
constrs = constrs_;
2069+
}
2070+
ty::ty_native_fn(_, arg_tys_, rt_) {
2071+
proto = ast::proto_fn;
2072+
arg_tys = arg_tys_;
2073+
rt = rt_;
2074+
cf = ast::return;
2075+
constrs = [];
2076+
}
2077+
_ { fail "LHS of bind expr didn't have a function type?!"; }
2078+
};
20712079

20722080
// For each blank argument, add the type of that argument
20732081
// to the resulting function type.

0 commit comments

Comments
 (0)