Commit eca23cfd authored by Rob Pike's avatar Rob Pike

slice doesn't work on a string literal

SVN=125259
parent 00368bae
// $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];
}
......@@ -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
......
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