Commit 262b6462 authored by Russ Cox's avatar Russ Cox

fix bug187 (itself buggy)

R=austin
DELTA=26  (0 added, 26 deleted, 0 changed)
OCL=34294
CL=34317
parent 37aa6c99
// $G $D/$F.go && $L $F.$A && ./$A.out
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import "os"
func main() {
// This bug doesn't arise with [...]int, or []interface{} or [3]interface{}.
a := [...]interface{} { 1, 2, 3 };
n := 0;
bug := false;
for _, v := range a {
if v.(int) != n {
println("BUG:", n, v.(int));
os.Exit(0);
}
n++;
}
}
......@@ -151,9 +151,6 @@ BUG: should fail
=========== bugs/bug169.go
BUG: errchk: command succeeded unexpectedly
=========== bugs/bug187.go
BUG: 0 1
=========== bugs/bug190.go
bugs/bug190.go:11: invalid recursive type []S
bugs/bug190.go:16: invalid recursive type S
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment