2012-06-19 14:00:09 -05:00
|
|
|
fn main() {
|
|
|
|
|
|
|
|
class b {
|
|
|
|
let i: int;
|
2012-08-01 19:30:05 -05:00
|
|
|
fn do_stuff() -> int { return 37; }
|
2012-06-19 14:00:09 -05:00
|
|
|
new(i:int) { self.i = i; }
|
|
|
|
}
|
|
|
|
|
|
|
|
// fn b(x:int) -> int { fail; }
|
|
|
|
|
|
|
|
let z = b(42);
|
|
|
|
assert(z.i == 42);
|
|
|
|
assert(z.do_stuff() == 37);
|
|
|
|
|
|
|
|
}
|