aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2015-01-29 14:12:14 -0800
committerRobert Griesemer <gri@golang.org>2015-01-29 22:22:27 +0000
commit1afe783e9f23b46389ab7a439ed4e0eee558382a (patch)
tree12796b0fc01fda6075fd4dbc542459d4aa0dfbb2
parent39a2d013becdcfa6c1c320818544e27af68cea4c (diff)
downloadtools-1afe783e9f23b46389ab7a439ed4e0eee558382a.tar.gz
go/types: update testdata (fix build)
Change-Id: Ifd38444c7c22f65f6e85fe6233b01703d1d14b4f Reviewed-on: https://go-review.googlesource.com/3540 Reviewed-by: Alan Donovan <adonovan@google.com>
-rw-r--r--go/types/testdata/constdecl.src19
-rw-r--r--go/types/testdata/vardecl.src9
2 files changed, 17 insertions, 11 deletions
diff --git a/go/types/testdata/constdecl.src b/go/types/testdata/constdecl.src
index 8577cb9..6de9b13 100644
--- a/go/types/testdata/constdecl.src
+++ b/go/types/testdata/constdecl.src
@@ -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" */
)
diff --git a/go/types/testdata/vardecl.src b/go/types/testdata/vardecl.src
index 329f4ff..fb6b5f7 100644
--- a/go/types/testdata/vardecl.src
+++ b/go/types/testdata/vardecl.src
@@ -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" */