]> Cypherpunks repositories - gostls13.git/commitdiff
slice doesn't work on a string literal
authorRob Pike <r@golang.org>
Sat, 28 Jun 2008 19:50:33 +0000 (12:50 -0700)
committerRob Pike <r@golang.org>
Sat, 28 Jun 2008 19:50:33 +0000 (12:50 -0700)
SVN=125259

test/bugs/bug061.go [new file with mode: 0644]
test/golden.out

diff --git a/test/bugs/bug061.go b/test/bugs/bug061.go
new file mode 100644 (file)
index 0000000..698f52c
--- /dev/null
@@ -0,0 +1,12 @@
+// $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 main() {
+       var s string;
+       s = "0000000000000000000000000000000000000000000000000000000000"[0:7];
+}
index 0e1a8c6c045b8076a2830210ee33d1282607dcd7..f2ea7592a80a2873f23bd92e6fa54835236e4631 100644 (file)
@@ -312,6 +312,12 @@ BUG: crashes
 =========== bugs/bug060.go
 BUG: crashes
 
+=========== bugs/bug061.go
+bugs/bug061.go:7: illegal types for operand: SLICE
+bugs/bug061.go:7: illegal types for operand: AS
+       (<string>*STRING)
+BUG: known to fail incorrectly
+
 =========== fixedbugs/bug000.go
 
 =========== fixedbugs/bug001.go