github.com/go-asm/go@v1.21.1-0.20240213172139-40c5ead50c48/cmd/compile/syntax/testdata/issue49205.go (about)

     1  // Copyright 2022 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package p
     6  
     7  // test case from issue
     8  
     9  type _ interface{
    10  	m /* ERROR unexpected int in interface type; possibly missing semicolon or newline or } */ int
    11  }
    12  
    13  // other cases where the fix for this issue affects the error message
    14  
    15  const (
    16  	x int = 10 /* ERROR unexpected literal "foo" in grouped declaration; possibly missing semicolon or newline or \) */ "foo"
    17  )
    18  
    19  var _ = []int{1, 2, 3 /* ERROR unexpected int in composite literal; possibly missing comma or } */ int }
    20  
    21  type _ struct {
    22  	x y /* ERROR syntax error: unexpected comma in struct type; possibly missing semicolon or newline or } */ ,
    23  }
    24  
    25  func f(a, b c /* ERROR unexpected d in parameter list; possibly missing comma or \) */ d) {
    26  	f(a, b, c /* ERROR unexpected d in argument list; possibly missing comma or \) */ d)
    27  }