]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: accept constraint literals with elided interfaces
authorRobert Griesemer <gri@golang.org>
Thu, 30 Sep 2021 17:04:46 +0000 (10:04 -0700)
committerRobert Griesemer <gri@golang.org>
Fri, 1 Oct 2021 17:27:24 +0000 (17:27 +0000)
commit952df981580659389679b27d65e1eceeedf0e2df
tree4c2ab95274f287f5b1c0592e746fe0b64457ca42
parentdab16c1c90626ca6c9704959500f120fd09546e6
cmd/compile: accept constraint literals with elided interfaces

This change enables the relaxed syntax for constraint literals
as proposed in issue #48424 and adds a simple smoke test for
the compiler. (Most of the relevant changes are in the syntax
and types2 package which have more extensive tests for this.)

This makes it possible to experiment with the new syntax while
we contemplate the fate of #48424.

If #48424 is accepted, this change can remain. If #48424 is
not accepted, reverting this CL will remove this feature in
the compiler.

For #48424.

Change-Id: I624fbb37c2f616ee9ad692e17e4fc75c9d5b06e5
Reviewed-on: https://go-review.googlesource.com/c/go/+/353389
Trust: Robert Griesemer <gri@golang.org>
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Dan Scales <danscales@google.com>
src/cmd/compile/internal/noder/noder.go
src/go/internal/gcimporter/gcimporter_test.go
test/typeparam/issue48424.go [new file with mode: 0644]