blob: 1a2fd1a6eb1a64d1d004dd5bcee7ee7710b4b39b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// error-pattern:Call to private method not allowed
class cat {
priv {
let mut meows : uint;
fn nap() { uint::range(1u, 10000u, |_i|{})}
}
let how_hungry : int;
new(in_x : uint, in_y : int) { self.meows = in_x; self.how_hungry = in_y; }
}
fn main() {
let nyan : cat = cat(52u, 99);
nyan.nap();
}
|