2017-02-16 13:52:01 -07:00
|
|
|
// errorcheck
|
|
|
|
|
|
|
|
// Copyright 2017 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 p
|
|
|
|
|
|
|
|
// These error messages are for the invalid literals on lines 19 and 20:
|
|
|
|
|
2020-02-10 23:02:47 -07:00
|
|
|
// ERROR "newline in character literal|newline in rune literal"
|
|
|
|
// ERROR "invalid character literal \(missing closing '\)|rune literal not terminated"
|
2017-02-16 13:52:01 -07:00
|
|
|
|
|
|
|
const (
|
2020-02-10 23:02:47 -07:00
|
|
|
_ = '' // ERROR "empty character literal or unescaped ' in character literal|empty rune literal"
|
2017-02-16 13:52:01 -07:00
|
|
|
_ = 'f'
|
2020-02-10 23:02:47 -07:00
|
|
|
_ = 'foo' // ERROR "invalid character literal \(more than one character\)|more than one character in rune literal"
|
2017-02-16 13:52:01 -07:00
|
|
|
//line issue15611.go:11
|
|
|
|
_ = '
|
|
|
|
_ = '
|