aboutsummaryrefslogtreecommitdiff
path: root/test/named1.go
AgeCommit message (Collapse)Author
2020-12-04[dev.typeparams] test: enable some more errorcheck testsRobert Griesemer
Change-Id: I103e3eeacd5b11efd63c965482a626878ba5ac81 Reviewed-on: https://go-review.googlesource.com/c/go/+/275216 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
2016-05-02all: make copyright headers consistent with one space after periodEmmanuel Odeke
Follows suit with https://go-review.googlesource.com/#/c/20111. Generated by running $ grep -R 'Go Authors. All' * | cut -d":" -f1 | while read F;do perl -pi -e 's/Go Authors. All/Go Authors. All/g' $F;done The code in cmd/internal/unvendor wasn't changed. Fixes #15213 Change-Id: I4f235cee0a62ec435f9e8540a1ec08ae03b1a75f Reviewed-on: https://go-review.googlesource.com/21819 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2014-08-11cmd/gc: comma-ok assignments produce untyped bool as 2nd resultChris Manghane
LGTM=rsc R=gri, rsc CC=golang-codereviews https://golang.org/cl/127950043
2012-02-24test/[n-z]*.go: add documentationRob Pike
R=golang-dev, bradfitz, r CC=golang-dev https://golang.org/cl/5700056
2012-02-22gc: new, less strict bool rulesRuss Cox
R=ken2 CC=golang-dev https://golang.org/cl/5688064
2012-02-21gc: return of ideal boolRuss Cox
This is a manual undo of CL 5674098. It does not implement the even less strict spec that we just agreed on, but it gets us back where we were at the last weekly. R=ken2 CC=golang-dev https://golang.org/cl/5683069
2012-02-18gc: drop ideal boolRuss Cox
R=golang-dev, ken2 CC=golang-dev https://golang.org/cl/5674098
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
2011-12-14gc: use inferred type rather than original one when reporting non-assignability.Luuk van Dijk
Fixes #2451 R=rsc, bradfitz CC=golang-dev https://golang.org/cl/5372105
2011-11-22allow direct conversion between string and named []byte, []runeRuss Cox
The allowed conversions before and after are: type Tstring string type Tbyte []byte type Trune []rune string <-> string // ok string <-> []byte // ok string <-> []rune // ok string <-> Tstring // ok string <-> Tbyte // was illegal, now ok string <-> Trune // was illegal, now ok Tstring <-> string // ok Tstring <-> []byte // ok Tstring <-> []rune // ok Tstring <-> Tstring // ok Tstring <-> Tbyte // was illegal, now ok Tstring <-> Trune // was illegal, now ok Update spec, compiler, tests. Use in a few packages. We agreed on this a few months ago but never implemented it. Fixes #1707. R=golang-dev, gri, r CC=golang-dev https://golang.org/cl/5421057
2011-11-11gc: remove m[k] = x, falseRuss Cox
R=ken2 CC=golang-dev https://golang.org/cl/5376076
2011-10-31gc: clean up printing.Luuk van Dijk
Got rid of all the magic mystery globals. Now for %N, %T, and %S, the flags +,- and # set a sticky debug, sym and export mode, only visible in the new fmt.c. Default is error mode. Handle h and l flags consistently with the least side effects, so we can now change things without worrying about unrelated things breaking. fixes #2361 R=rsc CC=golang-dev https://golang.org/cl/5316043
2011-03-11go code: replace closed(c) with x, ok := <-cRuss Cox
R=golang-dev, rog, bradfitzwork, r CC=golang-dev https://golang.org/cl/4243072
2011-01-31replace non-blocking send, receive syntax with selectRuss Cox
R=golang-dev, nigeltao, niemeyer, r CC=golang-dev https://golang.org/cl/4079053
2010-09-08test: Match gccgo error messages.Ian Lance Taylor
named1.go:40:11: error: argument 1 has incompatible type (cannot use type bool as type Bool) named1.go:41:11: error: argument 1 has incompatible type (cannot use type bool as type Bool) named1.go:43:7: error: incompatible types in assignment (cannot use type bool as type Bool) named1.go:44:12: error: argument 4 has incompatible type (cannot use type Bool as type bool) named1.go:46:4: error: incompatible types in assignment (cannot use type bool as type Bool) named1.go:48:11: error: argument 1 has incompatible type (cannot use type bool as type Bool) named1.go:50:7: error: incompatible types in assignment (cannot use type bool as type Bool) named1.go:54:7: error: incompatible types in assignment (cannot use type bool as type Bool) named1.go:60:7: error: incompatible types in assignment (cannot use type bool as type Bool) named1.go:63:9: error: argument 1 has incompatible type (cannot use type bool as type Bool) named1.go:64:4: error: incompatible types in assignment (cannot use type bool as type Bool) named1.go:67:17: error: invalid type conversion (cannot use type Slice as type String) R=rsc CC=golang-dev https://golang.org/cl/2146044
2010-06-08gc: new typechecking rulesRuss Cox
* Code for assignment, conversions now mirrors spec. * Changed some snprint -> smprint. * Renamed runtime functions to separate interface conversions from type assertions: convT2I, assertI2T, etc. * Correct checking of \U sequences. Fixes #840. Fixes #830. Fixes #778. R=ken2 CC=golang-dev https://golang.org/cl/1303042
2009-10-20gccgo does not distinguish "use" and "assign" in these errorIan Lance Taylor
messages. Match gccgo output. named1.go:32:2: error: argument 0 has wrong type (cannot use type bool as type Bool) named1.go:33:2: error: argument 0 has wrong type (cannot use type bool as type Bool) named1.go:35:5: error: incompatible type for map index (cannot use type bool as type Bool) named1.go:36:12: error: incompatible type for map assignment (cannot use type Bool as type bool) named1.go:38:5: error: incompatible types in assignment (cannot use type bool as type Bool) named1.go:40:2: error: argument 0 has wrong type (cannot use type bool as type Bool) named1.go:42:5: error: incompatible type for receive (cannot use type bool as type Bool) named1.go:46:5: error: incompatible type for type guard (cannot use type bool as type Bool) named1.go:50:5: error: incompatible type for type guard (cannot use type bool as type Bool) named1.go:53:2: error: argument 0 has wrong type (cannot use type bool as type Bool) named1.go:54:5: error: incompatible types in assignment (cannot use type bool as type Bool) R=rsc DELTA=4 (0 added, 0 deleted, 4 changed) OCL=35943 CL=35943
2009-09-24test: comparisons have type boolRuss Cox
R=r DELTA=81 (57 added, 24 deleted, 0 changed) OCL=34991 CL=34996