From 2bb5fbbf92a02d2457edd40d10ddd1d2594e74d6 Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Thu, 4 Sep 2008 16:48:19 -0700 Subject: resolve that all unnecessary backslashes are rejected. bug068 is not a bug. R=gri OCL=14838 CL=14838 --- test/bugs/bug068.go | 17 ----------------- test/fixedbugs/bug068.go | 19 +++++++++++++++++++ test/golden.out | 7 +++---- 3 files changed, 22 insertions(+), 21 deletions(-) delete mode 100644 test/bugs/bug068.go create mode 100644 test/fixedbugs/bug068.go diff --git a/test/bugs/bug068.go b/test/bugs/bug068.go deleted file mode 100644 index 9fe065652..000000000 --- a/test/bugs/bug068.go +++ /dev/null @@ -1,17 +0,0 @@ -// errchk $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 - -const c = '\''; // this works -const s = "\'"; // this doesn't - -/* -There is no reason why the escapes need to be different inside strings and chars. - -uetli:~/go/test/bugs gri$ 6g bug065.go -bug065.go:6: unknown escape sequence: ' -*/ diff --git a/test/fixedbugs/bug068.go b/test/fixedbugs/bug068.go new file mode 100644 index 000000000..f1dcce379 --- /dev/null +++ b/test/fixedbugs/bug068.go @@ -0,0 +1,19 @@ +// errchk $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. + +// RESOLUTION: This program is illegal. We should reject all unnecessary backslashes. + +package main + +const c = '\''; // this works +const s = "\'"; // this doesn't + +/* +There is no reason why the escapes need to be different inside strings and chars. + +uetli:~/go/test/bugs gri$ 6g bug068.go +bug068.go:6: unknown escape sequence: ' +*/ diff --git a/test/golden.out b/test/golden.out index 003ef0aaf..aa1173a66 100644 --- a/test/golden.out +++ b/test/golden.out @@ -84,10 +84,6 @@ bugs/bug064.go:15: illegal types for operand: CALL ({INT32;INT32;}) BUG: compilation should succeed -=========== bugs/bug068.go -bugs/bug068.go:6: unknown escape sequence: ' -BUG: compilation should succeed - =========== bugs/bug074.go bugs/bug074.go:6: illegal types for operand: CONV (*STRING) @@ -186,6 +182,9 @@ fixedbugs/bug051.go:10: expression must be a constant =========== fixedbugs/bug067.go ok +=========== fixedbugs/bug068.go +fixedbugs/bug068.go:8: unknown escape sequence: ' + =========== fixedbugs/bug070.go outer loop top k 0 inner loop top i 0 -- cgit v1.2.3