aboutsummaryrefslogtreecommitdiff
path: root/test/syntax
diff options
context:
space:
mode:
authorRyan Hitchman <hitchmanr@gmail.com>2012-04-02 11:00:55 -0400
committerRuss Cox <rsc@golang.org>2012-04-02 11:00:55 -0400
commit8a686792e08f1114fd7819a32d8c2e3c4ddddc14 (patch)
treea15c452fbdeb9fc708d84f7b33154dad7fb8cd96 /test/syntax
parenta9de5bb3eb36fcae6d0744603a5bd7a5be606796 (diff)
downloadgo-8a686792e08f1114fd7819a32d8c2e3c4ddddc14.tar.gz
go-8a686792e08f1114fd7819a32d8c2e3c4ddddc14.zip
gc: improve error message for composite literals with unexpected newlines
R=golang-dev, r, rsc CC=golang-dev https://golang.org/cl/5857045
Diffstat (limited to 'test/syntax')
-rw-r--r--test/syntax/composite.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/syntax/composite.go b/test/syntax/composite.go
new file mode 100644
index 0000000000..6565334935
--- /dev/null
+++ b/test/syntax/composite.go
@@ -0,0 +1,11 @@
+// errorcheck
+
+// Copyright 2012 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 a = []int{
+ 3 // ERROR "need trailing comma before newline in composite literal"
+}