2016-06-06 18:59:05 -06:00
|
|
|
// errorcheck -newparser=0
|
2015-10-04 14:33:02 -06:00
|
|
|
|
|
|
|
// 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.
|
|
|
|
|
2016-06-06 18:59:05 -06:00
|
|
|
// TODO(mdempsky): Update for new parser. New parser recovers more
|
|
|
|
// gracefully and doesn't trigger the "cannot declare name" error.
|
|
|
|
// Also remove "errorcheck -newparser=0" case in go/types.TestStdFixed.
|
|
|
|
|
2015-10-04 14:33:02 -06:00
|
|
|
package a
|
|
|
|
import"" // ERROR "import path is empty"
|
2016-02-23 00:07:30 -07:00
|
|
|
var? // ERROR "illegal character U\+003F '\?'"
|
2015-10-04 14:33:02 -06:00
|
|
|
|
2015-12-01 13:19:36 -07:00
|
|
|
var x int // ERROR "unexpected var" "cannot declare name"
|
2015-10-04 14:33:02 -06:00
|
|
|
|
|
|
|
func main() {
|
|
|
|
}
|