518dc52f85
This changes the indexing syntax from .() to [], the vector syntax from ~[] to [] and the extension syntax from #fmt() to #fmt[]
13 lines
194 B
Rust
13 lines
194 B
Rust
|
|
|
|
fn main() {
|
|
obj foo() {
|
|
fn m1(i: int) { i += 1; log "hi!"; }
|
|
fn m2(i: int) { i += 1; self.m1(i); }
|
|
}
|
|
let a = foo();
|
|
let i: int = 0;
|
|
a.m1(i);
|
|
a.m2(i);
|
|
}
|