aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/types/type.go
diff options
context:
space:
mode:
authorDan Scales <danscales@google.com>2021-07-05 20:58:56 -0700
committerDan Scales <danscales@google.com>2021-07-07 17:34:16 +0000
commitb614c05a151ffc45b8eb5725c9df399aca20663d (patch)
tree5c8a85a7682e4bc034695ac86b5ec4bfa2fdff4a /src/cmd/compile/internal/types/type.go
parentb4844c9f54eb6a559d8dc9333cf5b1e66dab8167 (diff)
downloadgo-b614c05a151ffc45b8eb5725c9df399aca20663d.tar.gz
go-b614c05a151ffc45b8eb5725c9df399aca20663d.zip
[dev.typeparams] cmd/compile: add built-in name/type "comparable".
This allows exporting comparable type bounds, and importing back into types2 for typechecking. Fixes typeparam/mdempsky/8.go Change-Id: I3ee12433df2ed68ac6ef4cad24be9fcdfaaca4e3 Reviewed-on: https://go-review.googlesource.com/c/go/+/333129 Run-TryBot: Dan Scales <danscales@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> Trust: Dan Scales <danscales@google.com>
Diffstat (limited to 'src/cmd/compile/internal/types/type.go')
-rw-r--r--src/cmd/compile/internal/types/type.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/types/type.go b/src/cmd/compile/internal/types/type.go
index 7f75000797..28312111ad 100644
--- a/src/cmd/compile/internal/types/type.go
+++ b/src/cmd/compile/internal/types/type.go
@@ -123,6 +123,8 @@ var (
// Predeclared error interface type.
ErrorType *Type
+ // Predeclared comparable interface type.
+ ComparableType *Type
// Types to represent untyped string and boolean constants.
UntypedString = New(TSTRING)