1
Fork 0

Add test case that checks that class members must be prefixed with "self"

Closes #2289.
This commit is contained in:
Tim Chevalier 2012-05-04 13:42:13 -07:00
parent 50ec6bd2c3
commit 95a2b5d42f

View file

@ -0,0 +1,15 @@
class cat {
priv {
let mut meows : uint;
fn sleep() { loop{} }
fn meow() {
#error("Meow");
meows += 1u; //! ERROR unresolved name
sleep(); //! ERROR unresolved name
}
}
new(in_x : uint) { self.meows = in_x; }
}
fn main() { }