rust/src/test/compile-fail/self-missing-method.rs
Marijn Haverbeke 7efef98901 Make uses of self in impls compile
Get rid of expr_self_call, introduces def_self. `self` is now,
syntactically, simply a variable. A method implicitly brings a `self`
binding into scope.

Issue #1227
2011-12-16 11:46:57 +01:00

13 lines
150 B
Rust

// error-pattern:attempted field access on type fn
fn main() {
obj foo() {
fn m() {
self();
}
}
let a = foo;
a.m();
}