Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
2a08f29e
Commit
2a08f29e
authored
Sep 04, 2008
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resolve that all unnecessary backslashes are rejected.
bug068 is not a bug. R=gri OCL=14838 CL=14838
parent
41d65ac4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
bug068.go
test/fixedbugs/bug068.go
+4
-2
golden.out
test/golden.out
+3
-4
No files found.
test/bugs/bug068.go
→
test/
fixed
bugs/bug068.go
View file @
2a08f29e
...
@@ -4,6 +4,8 @@
...
@@ -4,6 +4,8 @@
// Use of this source code is governed by a BSD-style
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// license that can be found in the LICENSE file.
// RESOLUTION: This program is illegal. We should reject all unnecessary backslashes.
package
main
package
main
const
c
=
'\'
'
;
// this works
const
c
=
'\'
'
;
// this works
...
@@ -12,6 +14,6 @@ const s = "\'"; // this doesn't
...
@@ -12,6 +14,6 @@ const s = "\'"; // this doesn't
/*
/*
There is no reason why the escapes need to be different inside strings and chars.
There is no reason why the escapes need to be different inside strings and chars.
uetli:~/go/test/bugs gri$ 6g bug06
5
.go
uetli:~/go/test/bugs gri$ 6g bug06
8
.go
bug06
5
.go:6: unknown escape sequence: '
bug06
8
.go:6: unknown escape sequence: '
*/
*/
test/golden.out
View file @
2a08f29e
...
@@ -84,10 +84,6 @@ bugs/bug064.go:15: illegal types for operand: CALL
...
@@ -84,10 +84,6 @@ bugs/bug064.go:15: illegal types for operand: CALL
({<u><int32>INT32;<v><int32>INT32;})
({<u><int32>INT32;<v><int32>INT32;})
BUG: compilation should succeed
BUG: compilation should succeed
=========== bugs/bug068.go
bugs/bug068.go:6: unknown escape sequence: '
BUG: compilation should succeed
=========== bugs/bug074.go
=========== bugs/bug074.go
bugs/bug074.go:6: illegal types for operand: CONV
bugs/bug074.go:6: illegal types for operand: CONV
(<string>*STRING)
(<string>*STRING)
...
@@ -186,6 +182,9 @@ fixedbugs/bug051.go:10: expression must be a constant
...
@@ -186,6 +182,9 @@ fixedbugs/bug051.go:10: expression must be a constant
=========== fixedbugs/bug067.go
=========== fixedbugs/bug067.go
ok
ok
=========== fixedbugs/bug068.go
fixedbugs/bug068.go:8: unknown escape sequence: '
=========== fixedbugs/bug070.go
=========== fixedbugs/bug070.go
outer loop top k 0
outer loop top k 0
inner loop top i 0
inner loop top i 0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment