Add a test for binding bare functions

Issue #1022
This commit is contained in:
Brian Anderson 2011-10-10 13:58:40 -07:00
parent 5b0f79b75a
commit 145feb3298

View file

@ -0,0 +1,9 @@
fn# f(i: int) {
assert i == 10;
}
fn main() {
// Binding a bare function turns it into a shared closure
let g: fn() = bind f(10);
g();
}