aboutsummaryrefslogtreecommitdiff
path: root/test/syntax
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-03-25 12:47:43 -0700
committerRuss Cox <rsc@golang.org>2010-03-25 12:47:43 -0700
commit78c27ed650b00177c90c25882576044bbaf73495 (patch)
tree287fc04d8343fb0ec8c7ce2f11d87b897f72d24d /test/syntax
parent4b40426a901af197e869e89058599a2bc9917018 (diff)
downloadgo-78c27ed650b00177c90c25882576044bbaf73495.tar.gz
go-78c27ed650b00177c90c25882576044bbaf73495.zip
gc: more syntax errors
R=r CC=golang-dev https://golang.org/cl/731041
Diffstat (limited to 'test/syntax')
-rw-r--r--test/syntax/vareq.go10
-rw-r--r--test/syntax/vareq1.go10
2 files changed, 20 insertions, 0 deletions
diff --git a/test/syntax/vareq.go b/test/syntax/vareq.go
new file mode 100644
index 0000000000..ef15fe5cde
--- /dev/null
+++ b/test/syntax/vareq.go
@@ -0,0 +1,10 @@
+// errchk $G -e $D/$F.go
+
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+func main() {
+ var x map[string]string{"a":"b"} // ERROR "var declaration missing ="
diff --git a/test/syntax/vareq1.go b/test/syntax/vareq1.go
new file mode 100644
index 0000000000..4697d018f7
--- /dev/null
+++ b/test/syntax/vareq1.go
@@ -0,0 +1,10 @@
+// errchk $G -e $D/$F.go
+
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+var x map[string]string{"a":"b"} // ERROR "var declaration missing ="
+