mirror of
https://github.com/golang/go
synced 2024-11-25 05:47:57 -07:00
2eac154b1c
Prefix keywords (type, default, case, etc.) with "keyword" in error messages to make them less ambiguous. Fixes #68589. Change-Id: I1eb92d1382f621b934167b3a4c335045da26be9f Reviewed-on: https://go-review.googlesource.com/c/go/+/623819 Auto-Submit: Robert Griesemer <gri@google.com> Reviewed-by: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Tim King <taking@google.com>
17 lines
463 B
Go
17 lines
463 B
Go
// errorcheck
|
|
|
|
// Copyright 2015 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.
|
|
|
|
// Test an internal compiler error on ? symbol in declaration
|
|
// following an empty import.
|
|
|
|
package a
|
|
var? // ERROR "invalid character U\+003F '\?'|invalid character 0x3f in input file"
|
|
|
|
var x int // ERROR "unexpected keyword var|expected identifier|expected type"
|
|
|
|
func main() {
|
|
}
|