1
0
mirror of https://github.com/golang/go synced 2024-09-30 22:38:33 -06:00

go/types: update testdata (fix build)

Change-Id: Ifd38444c7c22f65f6e85fe6233b01703d1d14b4f
Reviewed-on: https://go-review.googlesource.com/3540
Reviewed-by: Alan Donovan <adonovan@google.com>
This commit is contained in:
Robert Griesemer 2015-01-29 14:12:14 -08:00
parent 39a2d013be
commit 1afe783e9f
2 changed files with 17 additions and 11 deletions

View File

@ -20,17 +20,20 @@ func _() {
}
// Identifier and expression arity must match.
const _ /* ERROR "missing init expr for _" */
// The first error message is produced by the parser.
// In a real-world scenario, the type-checker would not be run
// in this case and the 2nd error message would not appear.
const _ /* ERROR "missing constant value" */ /* ERROR "missing init expr for _" */
const _ = 1, 2 /* ERROR "extra init expr 2" */
const _ /* ERROR "missing init expr for _" */ int
const _ /* ERROR "missing constant value" */ /* ERROR "missing init expr for _" */ int
const _ int = 1, 2 /* ERROR "extra init expr 2" */
const (
_ /* ERROR "missing init expr for _" */
_ /* ERROR "missing constant value" */ /* ERROR "missing init expr for _" */
_ = 1, 2 /* ERROR "extra init expr 2" */
_ /* ERROR "missing init expr for _" */ int
_ /* ERROR "missing constant value" */ /* ERROR "missing init expr for _" */ int
_ int = 1, 2 /* ERROR "extra init expr 2" */
)
@ -51,17 +54,17 @@ const (
)
func _() {
const _ /* ERROR "missing init expr for _" */
const _ /* ERROR "missing constant value" */ /* ERROR "missing init expr for _" */
const _ = 1, 2 /* ERROR "extra init expr 2" */
const _ /* ERROR "missing init expr for _" */ int
const _ /* ERROR "missing constant value" */ /* ERROR "missing init expr for _" */ int
const _ int = 1, 2 /* ERROR "extra init expr 2" */
const (
_ /* ERROR "missing init expr for _" */
_ /* ERROR "missing constant value" */ /* ERROR "missing init expr for _" */
_ = 1, 2 /* ERROR "extra init expr 2" */
_ /* ERROR "missing init expr for _" */ int
_ /* ERROR "missing constant value" */ /* ERROR "missing init expr for _" */ int
_ int = 1, 2 /* ERROR "extra init expr 2" */
)

View File

@ -14,9 +14,12 @@ var m map[string]int
var _ int
var _, _ int
var _ /* ERROR "missing type or init expr" */
var _ /* ERROR "missing type or init expr" */, _
var _ /* ERROR "missing type or init expr" */, _, _
// The first error message is produced by the parser.
// In a real-world scenario, the type-checker would not be run
// in this case and the 2nd error message would not appear.
var _ /* ERROR "missing variable type" */ /* ERROR "missing type or init expr" */
var _ /* ERROR "missing variable type" */ /* ERROR "missing type or init expr" */, _
var _ /* ERROR "missing variable type" */ /* ERROR "missing type or init expr" */, _, _
// The initializer must be an expression.
var _ = int /* ERROR "not an expression" */