summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-12-23 13:48:44 -0800
committerRuss Cox <rsc@golang.org>2009-12-23 13:48:44 -0800
commit3a245f94a560174b4d20e018bcc66e467a7e47e7 (patch)
tree988b6f694f8f8a9870f38bf41483a1e54072ef5e /src
parent6b23b77e390673e086731e93a8dada9d02f64587 (diff)
downloadgolang-3a245f94a560174b4d20e018bcc66e467a7e47e7.tar.gz
go_spec: use PrimaryExpr as type switch expression
Without this change, the spec parses <-c.(type) as (<-c).(type) but parses <-c.(int) as <-(c.(int)). With this change, the former parses as <-(c.(type)). All three parsers already implement this rule, because they look for the "type" word during parsing of a standard type assertion. This change merely brings the spec in line with the implementations. http://code.google.com/p/go/source/browse/src/cmd/gc/go.y#801 http://code.google.com/p/go/source/browse/src/pkg/go/parser/parser.go#900 http://gcc.gnu.org/viewcvs/branches/gccgo/gcc/go/parse.cc?revision=155389&view=markup#l2469 Pointed out by Brett Kail on golang-nuts. R=gri CC=golang-dev http://codereview.appspot.com/182044
Diffstat (limited to 'src')
0 files changed, 0 insertions, 0 deletions