]> Cypherpunks repositories - gostls13.git/commit
cmd/gc: allow new conversion syntax
authorRuss Cox <rsc@golang.org>
Sun, 3 Feb 2013 05:03:10 +0000 (00:03 -0500)
committerRuss Cox <rsc@golang.org>
Sun, 3 Feb 2013 05:03:10 +0000 (00:03 -0500)
commitffc742b65803ac3ceee522b145380ad731317eed
tree89cdcde2a0078eebbad97e89a06a4e71bcdf618b
parent2af3cbe308986005715bed3fa8ec5975e32ea7b7
cmd/gc: allow new conversion syntax

For consistency with conversions that look like function calls,
conversions that don't look like function calls now allow an
optional trailing comma.

That is, int(x,) has always been syntactically valid.
Now []int(x,) is valid too.

Fixes #4162.

R=ken2
CC=golang-dev
https://golang.org/cl/7288045
src/cmd/gc/go.y
src/cmd/gc/y.tab.c
src/cmd/gc/yerr.h
test/fixedbugs/issue4162.go [new file with mode: 0644]