Commit Graph

4 Commits

Author SHA1 Message Date
Ian Lance Taylor bc00f5ba9f [dev.go2go] test: drop type keyword, always provide constraint
This is a rewrite to drop the type keyword for parameterized functions
and types, and to instead always provide a constraint.

We can revert if we don't like this approach.

Change-Id: If4669fb4e2015067e9f955ff8567ed421be639ea
Reviewed-on: https://go-review.googlesource.com/c/go/+/248880
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-08-17 17:54:48 +00:00
Ian Lance Taylor ca218546b8 [dev.go2go] test: rewrite generic tests to square bracket syntax
We can roll back this CL if we go back to parentheses.

Change-Id: Ideb7dbe8e3c4499d76518a5c9b6f7931a7c103a4
Reviewed-on: https://go-review.googlesource.com/c/go/+/243158
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-07-16 20:18:10 +00:00
Ian Lance Taylor db04e7cb2e go/go2go, cmd/go2go, test: rewrite example code to not use contracts
Don't emit interfaces that are type bounds in the generated .go file.

Change-Id: I9b0fd2f6041e9464147ad6d82d349fe894ea762d
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go2-dev/+/735474
Reviewed-by: Robert Griesemer <gri@google.com>
2020-06-13 12:24:51 -07:00
Ian Lance Taylor 6df3320d36 test: drop a 0 from gen/err000n.go2
Matches the g cases.

Change-Id: If0c2558b9304cdd73e01d8718303e8fb0fccaf34
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go2-dev/+/714999
Reviewed-by: Ian Lance Taylor <iant@google.com>
2020-06-13 12:24:49 -07:00