Commit 8a686792 authored by Ryan Hitchman's avatar Ryan Hitchman Committed by Russ Cox

gc: improve error message for composite literals with unexpected newlines

R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/5857045
parent a9de5bb3
......@@ -65,6 +65,9 @@ static struct {
% loadsys package imports LVAR LNAME '=' LNAME '{' LNAME ';'
"need trailing comma before newline in composite literal",
% loadsys package imports LVAR LNAME '=' comptype '{' LNAME ';'
"need trailing comma before newline in composite literal",
% loadsys package imports LFUNC LNAME '(' ')' '{' LFUNC LNAME
"nested func not allowed",
......
......@@ -65,6 +65,9 @@ static struct {
425, ';',
"need trailing comma before newline in composite literal",
435, ';',
"need trailing comma before newline in composite literal",
112, LNAME,
"nested func not allowed",
......
// 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"
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment