]> Cypherpunks repositories - gostls13.git/commit
[dev.typeparams] cmd/compile: adding union support in types1
authorDan Scales <danscales@google.com>
Tue, 25 May 2021 03:36:42 +0000 (20:36 -0700)
committerDan Scales <danscales@google.com>
Wed, 26 May 2021 15:33:02 +0000 (15:33 +0000)
commitfd54ae8b0c7ed3ef9869112586069f7cac82cf1e
treef328bab9546644f1ed7c6a947871850952e6f6d8
parent6c9e1c58bc7661638ee084e40a3b6fc907825496
[dev.typeparams] cmd/compile: adding union support in types1

Add union support in types1, and allow exporting of unions, and
importing unions back into types1 and types2.

Added new test mincheck.go/mincheck.dir that tests that type lists (type
sets) are correctly exported/imported, so that types2 gives correct
errors that an instantiation doesn't fit the type list in the type param
constraint.

Change-Id: I8041c6c79289c870a95ed5a1b10e4c1c16985b12
Reviewed-on: https://go-review.googlesource.com/c/go/+/322609
Trust: Dan Scales <danscales@google.com>
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Dan Scales <danscales@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
13 files changed:
src/cmd/compile/internal/importer/iimport.go
src/cmd/compile/internal/noder/types.go
src/cmd/compile/internal/typecheck/iexport.go
src/cmd/compile/internal/typecheck/iimport.go
src/cmd/compile/internal/types/kind_string.go
src/cmd/compile/internal/types/size.go
src/cmd/compile/internal/types/type.go
src/cmd/compile/internal/types2/type.go
test/fixedbugs/bug195.go
test/fixedbugs/issue11614.go
test/typeparam/mincheck.dir/a.go [new file with mode: 0644]
test/typeparam/mincheck.dir/main.go [new file with mode: 0644]
test/typeparam/mincheck.go [new file with mode: 0644]