From 952df981580659389679b27d65e1eceeedf0e2df Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Thu, 30 Sep 2021 10:04:46 -0700 Subject: 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 Trust: Dan Scales Run-TryBot: Robert Griesemer Reviewed-by: Robert Findley Reviewed-by: Dan Scales --- src/cmd/compile/internal/noder/noder.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cmd/compile/internal/noder/noder.go') 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. -- cgit v1.3