aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/noder/noder.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2021-09-30 10:04:46 -0700
committerRobert Griesemer <gri@golang.org>2021-10-01 17:27:24 +0000
commit952df981580659389679b27d65e1eceeedf0e2df (patch)
tree4c2ab95274f287f5b1c0592e746fe0b64457ca42 /src/cmd/compile/internal/noder/noder.go
parentdab16c1c90626ca6c9704959500f120fd09546e6 (diff)
downloadgo-952df981580659389679b27d65e1eceeedf0e2df.tar.xz
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>
Diffstat (limited to 'src/cmd/compile/internal/noder/noder.go')
-rw-r--r--src/cmd/compile/internal/noder/noder.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/noder/noder.go b/src/cmd/compile/internal/noder/noder.go
index 7c14fcf041..2e7b636681 100644
--- a/src/cmd/compile/internal/noder/noder.go
+++ b/src/cmd/compile/internal/noder/noder.go
@@ -36,7 +36,7 @@ func LoadPackage(filenames []string) {
mode := syntax.CheckBranches
if supportsGenerics {
- mode |= syntax.AllowGenerics
+ mode |= syntax.AllowGenerics | syntax.AllowTypeSets
}
// Limit the number of simultaneously open files.