Skip to content

Commit d72d504

Browse files
Eric Holkbrson
authored andcommitted
Fixing typechecking for spawn.
1 parent 4c4a4ae commit d72d504

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/comp/middle/typeck.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2387,7 +2387,9 @@ fn check_expr(&@stmt_ctxt scx, &@ast::expr expr) {
23872387
check_call(scx, f, args);
23882388

23892389
auto fty = expr_ty(scx.fcx.ccx.tcx, f);
2390-
demand::simple(scx, f.span, ty::mk_nil(scx.fcx.ccx.tcx), fty);
2390+
auto ret_ty = ty::ret_ty_of_fn_ty(scx.fcx.ccx.tcx, fty);
2391+
2392+
demand::simple(scx, f.span, ty::mk_nil(scx.fcx.ccx.tcx), ret_ty);
23912393

23922394
// FIXME: Other typechecks needed
23932395

0 commit comments

Comments
 (0)