diff options
author | Dan Scales <danscales@google.com> | 2021-06-02 18:12:14 -0700 |
---|---|---|
committer | Dan Scales <danscales@google.com> | 2021-06-03 16:05:22 +0000 |
commit | 370ff5ff96cf02dfbbc33b70934219367fa700bb (patch) | |
tree | f783225605e2845743733f86fb41472e3b659e0d /test/typeparam/list.go | |
parent | 5a008a92e84f05e79fbe9fd8ab283bcee95d54ee (diff) | |
download | go-370ff5ff96cf02dfbbc33b70934219367fa700bb.tar.gz go-370ff5ff96cf02dfbbc33b70934219367fa700bb.zip |
[dev.typeparams] test: update all the typeparam tests to use the new union/tilde syntax
Did a mix of tilde and non-tilde usage. Tilde notation is not quite
fully functional, so no tests are currently trying to distinguish
(fail/not fail) based on tilde usage.
Change-Id: Ib50cec2fc0684f9d9f3561c889fd44c7a7af458c
Reviewed-on: https://go-review.googlesource.com/c/go/+/324572
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>
Diffstat (limited to 'test/typeparam/list.go')
-rw-r--r-- | test/typeparam/list.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/typeparam/list.go b/test/typeparam/list.go index 579078f02f..c63c9bff79 100644 --- a/test/typeparam/list.go +++ b/test/typeparam/list.go @@ -11,10 +11,10 @@ import ( ) type Ordered interface { - type int, int8, int16, int32, int64, - uint, uint8, uint16, uint32, uint64, uintptr, - float32, float64, - string + ~int | ~int8 | ~int16 | ~int32 | ~int64 | + ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr | + ~float32 | ~float64 | + ~string } // _List is a linked list of ordered values of type T. @@ -34,9 +34,9 @@ func (l *_List[T]) Largest() T { } type OrderedNum interface { - type int, int8, int16, int32, int64, - uint, uint8, uint16, uint32, uint64, uintptr, - float32, float64 + ~int | ~int8 | ~int16 | ~int32 | ~int64 | + ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr | + ~float32 | ~float64 } // _ListNum is a linked _List of ordered numeric values of type T. |