Add a test that generic bare functions can be bound

Issue #1022
This commit is contained in:
Brian Anderson 2011-10-13 12:16:26 -07:00
parent 6a7800508b
commit 60cfa91897

View file

@ -0,0 +1,10 @@
fn# f<T>(i: T, j: T, k: T) {
assert i == j;
assert j != k;
}
fn main() {
// Binding a bare function turns it into a shared closure
let g: fn() = bind f(10, 10, 20);
g();
}