mirror of
https://github.com/golang/go.git
synced 2025-05-14 11:54:38 +00:00
`` strings should not accept newlines as characters
R=r DELTA=17 (17 added, 0 deleted, 0 changed) OCL=30417 CL=30422
This commit is contained in:
parent
76c87d58cd
commit
fe537dc8d5
18
test/bugs/bug164.go
Normal file
18
test/bugs/bug164.go
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
// $G $D/$F.go
|
||||||
|
|
||||||
|
// 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
|
||||||
|
|
||||||
|
// Multi-line string literal do not allow newline chars according to spec
|
||||||
|
// but 6g accepts this code with the newlines interpreted as newlines.
|
||||||
|
|
||||||
|
const s = `
|
||||||
|
Hello, World!
|
||||||
|
`
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
print(s)
|
||||||
|
}
|
@ -108,6 +108,9 @@ BUG: should fail
|
|||||||
=========== bugs/bug163.go
|
=========== bugs/bug163.go
|
||||||
BUG: should not compile
|
BUG: should not compile
|
||||||
|
|
||||||
|
=========== bugs/bug164.go
|
||||||
|
BUG: should not compile
|
||||||
|
|
||||||
=========== fixedbugs/bug016.go
|
=========== fixedbugs/bug016.go
|
||||||
fixedbugs/bug016.go:7: constant -3 overflows uint
|
fixedbugs/bug016.go:7: constant -3 overflows uint
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user