Commit 0b6e6afb authored by Rob Pike's avatar Rob Pike

add test that was mistakenly not checked in, now fixed

SVN=125408
parent 6973e381
// $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
func P(a *[]string) string {
s := "{";
for i := 0; i < 2; i++ {
if i > 0 {
s += ","
}
s += `"` + a[i] + `"`;
}
s +="}";
return s;
}
func main() {
m := new(map[string] *[]string);
as := new([2]string);
as[0] = "0";
as[1] = "1";
m["0"] = as;
a := m["0"];
a[0] = "x";
m["0"][0] = "deleted";
if m["0"][0] != "deleted" {
sys.exit(1);
}
}
......@@ -306,9 +306,6 @@ BUG: compilation should succeed
bugs/bug057.go:13: syntax error
BUG: compilation should succeed
=========== bugs/bug059.go
BUG: crashes
=========== bugs/bug060.go
BUG: crashes
......@@ -369,3 +366,5 @@ BUG: known to fail incorrectly
=========== fixedbugs/bug045.go
=========== fixedbugs/bug058.go
=========== fixedbugs/bug059.go
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