summaryrefslogtreecommitdiff
path: root/test/syntax/interface.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-01-26 23:13:22 -0800
committerRuss Cox <rsc@golang.org>2010-01-26 23:13:22 -0800
commitda0f154cecf72a30fb2412aa018803208e80dde3 (patch)
tree1535ebe4c0e90e048e14683b415f114c7471341a /test/syntax/interface.go
parent2ccb4107adca6819d7765672f49d7de7d2024736 (diff)
downloadgolang-da0f154cecf72a30fb2412aa018803208e80dde3.tar.gz
gc: improved syntax errors
* example-based syntax errors (go.errors) * enable bison's more specific errors and translate grammar token names into tokens like ++ * test cases R=ken2, r, ken3 CC=golang-dev http://codereview.appspot.com/194085
Diffstat (limited to 'test/syntax/interface.go')
-rw-r--r--test/syntax/interface.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/syntax/interface.go b/test/syntax/interface.go
new file mode 100644
index 000000000..a7f43533a
--- /dev/null
+++ b/test/syntax/interface.go
@@ -0,0 +1,14 @@
+// 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
+
+type T interface {
+ f, g () // ERROR "name list not allowed in interface type"
+}
+
+
+