aboutsummaryrefslogtreecommitdiff
path: root/test/parentype.go
AgeCommit message (Collapse)Author
2012-02-24test/[n-r]*.go: add documentationRob Pike
The rename ones needed redoing. R=golang-dev, bradfitz, rsc CC=golang-dev https://golang.org/cl/5698054
2012-02-16test: use testlib (final 61)Russ Cox
X ,s;^// \$G (\$D/)?\$F\.go *$;// compile;g X ,s;^// \$G (\$D/)?\$F\.go && \$L \$F\.\$A *$;// build;g X ,s;^// \$G (\$D/)?\$F\.go && \$L \$F\.\$A && \./\$A\.out *$;// run;g X ,s;^// errchk \$G( -e)? (\$D/)?\$F\.go *$;// errorcheck;g R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5671080
2010-09-04test: remove semiocolons.Rob Pike
The ken directory is untouched so we have some examples with explicit semis. R=gri CC=golang-dev https://golang.org/cl/2157041
2010-07-29go_spec: don't allow parens around the literal type of composite literalsRobert Griesemer
Background: The current spec is imprecise with respect to the parsing ambiguity for composite literals: It says that the ambiguity arises when the TypeName form of the LiteralType is used. The following code: if (B) {} ... is not using the TypeName form (but the parenthesized TypeName form) and thus could be interpreted as: if ((B){}) ... instead of if B {} ... Both compilers and gofmt choose the latter interpretation. One could fix the spec by making the clause regarding the parsing ambiguity more precise ("...using the _possibly parenthesized_ TypeName form of the LiteralType..."). The alternative (chosen here) is to simply disallow parenthesized literal types. Except for a single test case (test/parentype.go) there appears to be no Go code under $GOROOT containing parenthesized literal types. Furthermore, parentheses are never needed around a literal type for correct parsing. R=golang-dev CC=golang-dev https://golang.org/cl/1913041
2009-09-29undo 35108 (disallow parens around type in struct literal).Russ Cox
allow parens around [...]int in struct literal. R=ken OCL=35112 CL=35130
2009-09-29disallow parens around type in struct literal syntax,Russ Cox
per discussion with gri. R=ken OCL=35108 CL=35108
2009-03-03Automated g4 rollback of changelist 25024,Russ Cox
plus significant hand editing. Back to T{x} for composite literals. R=r OCL=25612 CL=25632
2009-02-18allow parens to disambiguate types.Russ Cox
examples: chan <- (chan int) chan (<- chan int) (map[string]func())("a": main) R=ken OCL=25151 CL=25151