aboutsummaryrefslogtreecommitdiff
path: root/test/typeparam/fact.go
diff options
context:
space:
mode:
authorDan Scales <danscales@google.com>2021-06-02 18:12:14 -0700
committerDan Scales <danscales@google.com>2021-06-03 16:05:22 +0000
commit370ff5ff96cf02dfbbc33b70934219367fa700bb (patch)
treef783225605e2845743733f86fb41472e3b659e0d /test/typeparam/fact.go
parent5a008a92e84f05e79fbe9fd8ab283bcee95d54ee (diff)
downloadgo-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/fact.go')
-rw-r--r--test/typeparam/fact.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/typeparam/fact.go b/test/typeparam/fact.go
index ea86ae3e02..baa7fbc68e 100644
--- a/test/typeparam/fact.go
+++ b/test/typeparam/fact.go
@@ -8,7 +8,7 @@ package main
import "fmt"
-func fact[T interface { type int, int64, float64 }](n T) T {
+func fact[T interface { ~int | ~int64 | ~float64 }](n T) T {
if n == 1 {
return 1
}