From 80044e397fc3bac68ff7228560ea650d164f8939 Mon Sep 17 00:00:00 2001 From: Ryan Hitchman Date: Mon, 2 Apr 2012 11:00:55 -0400 Subject: gc: improve error message for composite literals with unexpected newlines R=golang-dev, r, rsc CC=golang-dev http://codereview.appspot.com/5857045 Committer: Russ Cox --- test/syntax/composite.go | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/syntax/composite.go (limited to 'test/syntax') diff --git a/test/syntax/composite.go b/test/syntax/composite.go new file mode 100644 index 000000000..656533493 --- /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" +} -- cgit v1.2.1