summary refs log tree commit diff
path: root/src/test/compile-fail/class-missing-self.rs
blob: 5e27afaf16416748fe20c75207e64a585cf07f28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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() { }