github.com/euank/go@v0.0.0-20160829210321-495514729181/test/fixedbugs/issue11610.go (about)

     1  // errorcheck -newparser=0
     2  
     3  // Copyright 2015 The Go Authors. All rights reserved.
     4  // Use of this source code is governed by a BSD-style
     5  // license that can be found in the LICENSE file.
     6  
     7  // Test an internal compiler error on ? symbol in declaration
     8  // following an empty import.
     9  
    10  // TODO(mdempsky): Update for new parser. New parser recovers more
    11  // gracefully and doesn't trigger the "cannot declare name" error.
    12  // Also remove "errorcheck -newparser=0" case in go/types.TestStdFixed.
    13  
    14  package a
    15  import""  // ERROR "import path is empty"
    16  var?      // ERROR "illegal character U\+003F '\?'"
    17  
    18  var x int // ERROR "unexpected var" "cannot declare name"
    19  
    20  func main() {
    21  }