Skip to content

Commit 29304ff

Browse files
committed
---
yaml --- r: 5877 b: refs/heads/master c: ed985b6 h: refs/heads/master i: 5875: c0d3d31 v: v3
1 parent 23e135c commit 29304ff

File tree

3 files changed

+12
-1
lines changed

3 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: 354bfc829248965fa23c14cccd8c4db1685f3701
2+
refs/heads/master: ed985b61d5c1e35b10a135ec8872aec2fbf66531

trunk/src/comp/middle/typeck.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -916,6 +916,10 @@ fn do_fn_ty_coerce(fcx: @fn_ctxt, sp: span, actual: ty::t, expected: ty::t)
916916
ty::mk_fn(fcx.ccx.tcx, ast::proto_fn, args, ret_ty, cf,
917917
constrs)
918918
}
919+
some(ty::ty_fn(ast::proto_block., _, _, _, _)) {
920+
ty::mk_fn(fcx.ccx.tcx, ast::proto_block, args, ret_ty, cf,
921+
constrs)
922+
}
919923
_ { actual }
920924
}
921925
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
fn# bare() {}
2+
3+
fn likes_block(f: block()) { f() }
4+
5+
fn main() {
6+
likes_block(bare);
7+
}

0 commit comments

Comments
 (0)