2012-02-17 04:49:30 +00:00
|
|
|
// errorcheck
|
2008-07-10 20:45:02 +00:00
|
|
|
|
|
|
|
// 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.
|
|
|
|
|
2008-09-04 23:48:19 +00:00
|
|
|
// RESOLUTION: This program is illegal. We should reject all unnecessary backslashes.
|
|
|
|
|
2008-07-10 20:45:02 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
const c = '\''; // this works
|
2009-07-30 23:46:14 +00:00
|
|
|
const s = "\'"; // ERROR "invalid|escape"
|
2008-07-10 20:45:02 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
There is no reason why the escapes need to be different inside strings and chars.
|
|
|
|
|
2008-09-04 23:48:19 +00:00
|
|
|
uetli:~/go/test/bugs gri$ 6g bug068.go
|
|
|
|
bug068.go:6: unknown escape sequence: '
|
2008-07-10 20:45:02 +00:00
|
|
|
*/
|