blob: 961da730e3bdaa0a22df41317880e3abe9eb0096 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
// xfail-stage0
// -*- 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);
}
|