diff options
author | Rob Pike <r@golang.org> | 2008-11-24 16:23:49 -0800 |
---|---|---|
committer | Rob Pike <r@golang.org> | 2008-11-24 16:23:49 -0800 |
commit | 3bbe3affb06f764d075a753148677b8c7bf813bc (patch) | |
tree | ff96db95889ea94087ab239ff960c7f75af95d1d | |
parent | b88e7055b578aa6b75237838fd1035f06b5f4970 (diff) | |
download | golang-3bbe3affb06f764d075a753148677b8c7bf813bc.tar.gz |
compiler catches out of bounds; work around
R=ken
OCL=19943
CL=19943
-rw-r--r-- | test/ken/array.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/ken/array.go b/test/ken/array.go index 0dac2a689..918bb5b6f 100644 --- a/test/ken/array.go +++ b/test/ken/array.go @@ -139,7 +139,8 @@ testfdfault() a[i] = 0; } print("should fault\n"); - a[80] = 0; + x := 80; + a[x] = 0; print("bad\n"); } |