518dc52f85
This changes the indexing syntax from .() to [], the vector syntax from ~[] to [] and the extension syntax from #fmt() to #fmt[]
17 lines
283 B
Rust
17 lines
283 B
Rust
// Reduced test case for issue #540.
|
|
fn main() {
|
|
obj a() {
|
|
fn foo() -> int { ret 2; }
|
|
}
|
|
|
|
let my_a = a();
|
|
let my_b =
|
|
obj () {
|
|
fn baz() -> int { ret self.foo(); }
|
|
with
|
|
my_a
|
|
};
|
|
|
|
assert (my_b.baz() == 2);
|
|
}
|