blob: e646a107113849cde1ba3ac39b6dd7ccce92948b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
// -*- rust -*-
// error-pattern:bounds check
fn main() {
let vec[int] v = vec(10);
let int x = 0;
check (v.(x) == 10);
// Bounds-check failure.
check (v.(x + 2) == 20);
}
|