// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// This test checks syntax errors which differ between
+// go/parser and the syntax package.
+// TODO: consolidate eventually
+
package p
-type F { // ERROR syntax error
+type F { // ERROR expected type|type declaration
float64
-} // ERROR syntax error
+} // ERROR expected declaration|non-declaration statement
func _[T F | int](x T) {
_ = x == 0 // don't crash when recording type of 0
// test case from issue
-type FloatType { // ERROR syntax error
+type FloatType { // ERROR expected type|type declaration
float32 | float64
-} // ERROR syntax error
+} // ERROR expected declaration|non-declaration statement
type IntegerType interface {
int8 | int16 | int32 | int64 | int |
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// This test checks syntax errors which differ between
+// go/parser and the syntax package.
+// TODO: consolidate eventually
+
package p
-type F { // ERROR expected type
+type F { // ERROR expected type|type declaration
float64
-} // ERROR expected declaration
+} // ERROR expected declaration|non-declaration statement
func _[T F | int](x T) {
_ = x == 0 // don't crash when recording type of 0
// test case from issue
-type FloatType { // ERROR expected type
+type FloatType { // ERROR expected type|type declaration
float32 | float64
-} // ERROR expected declaration
+} // ERROR expected declaration|non-declaration statement
type IntegerType interface {
int8 | int16 | int32 | int64 | int |