2011-06-15 13:19:50 -05:00
|
|
|
|
|
|
|
|
2010-06-23 23:03:09 -05:00
|
|
|
fn main() {
|
2011-06-15 13:19:50 -05:00
|
|
|
// Testcase for issue #59.
|
2010-06-23 23:03:09 -05:00
|
|
|
|
2011-07-27 07:19:39 -05:00
|
|
|
obj simple(x: int, y: int) {
|
2011-06-15 13:19:50 -05:00
|
|
|
fn sum() -> int { ret x + y; }
|
|
|
|
}
|
2011-07-27 07:19:39 -05:00
|
|
|
let obj0 = simple(1, 2);
|
|
|
|
let ctor0 = bind simple(1, _);
|
|
|
|
let ctor1 = bind simple(_, 2);
|
|
|
|
let obj1 = ctor0(2);
|
|
|
|
let obj2 = ctor1(1);
|
2011-06-15 13:19:50 -05:00
|
|
|
assert (obj0.sum() == 3);
|
|
|
|
assert (obj1.sum() == 3);
|
|
|
|
assert (obj2.sum() == 3);
|
2011-08-19 17:16:48 -05:00
|
|
|
}
|