summary refs log tree commit diff
path: root/src/test/auxiliary/cci_class_3.rs
blob: dab856377f8f38831c06a14fe2d7ff49a7184b02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
mod kitties {

class cat {
  priv {
    let mut meows : uint;
  }

  let how_hungry : int;

  new(in_x : uint, in_y : int) { self.meows = in_x; self.how_hungry = in_y; }

  fn speak() { self.meows += 1u; }
  fn meow_count() -> uint { self.meows }

}

}