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