blob: 8780b22a002d891b38f591cd86bb2264d24e71e4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
fn main() {
// Testcase for issue #59.
obj simple(int x, int y) {
fn sum() -> int {
ret x + y;
}
}
auto obj0 = simple(1,2);
auto ctor0 = bind simple(1, _);
auto ctor1 = bind simple(_, 2);
auto obj1 = ctor0(2);
auto obj2 = ctor1(1);
check (obj0.sum() == 3);
check (obj1.sum() == 3);
check (obj2.sum() == 3);
}
|