Skip to content

Commit 60cfa91

Browse files
committed
Add a test that generic bare functions can be bound
Issue #1022
1 parent 6a78005 commit 60cfa91

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
fn# f<T>(i: T, j: T, k: T) {
2+
assert i == j;
3+
assert j != k;
4+
}
5+
6+
fn main() {
7+
// Binding a bare function turns it into a shared closure
8+
let g: fn() = bind f(10, 10, 20);
9+
g();
10+
}

0 commit comments

Comments
 (0)