mirror of
https://github.com/golang/go
synced 2024-11-08 19:16:25 -07:00
4b8895e2dd
- make the scanner unconditionally gc compatible - consistently use "invalid" instead "illegal" in errors Reviewed in and cherry-picked from https://go-review.googlesource.com/#/c/33896/. Change-Id: I4c4253e7392f3311b0d838bbe503576c9469b203 Reviewed-on: https://go-review.googlesource.com/34237 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
18 lines
426 B
Go
18 lines
426 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
|
|
import"" // ERROR "import path is empty"
|
|
var? // ERROR "invalid character U\+003F '\?'"
|
|
|
|
var x int // ERROR "unexpected var"
|
|
|
|
func main() {
|
|
}
|