From: Robert Griesemer Date: Mon, 20 May 2024 21:00:06 +0000 (-0700) Subject: internal/goexperiment: add aliastypeparams GOEXPERIMENT flag X-Git-Tag: go1.23rc1~254 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=c3591cb30ce1680b97921a20a1a4aa8d96bf6292;p=gostls13.git internal/goexperiment: add aliastypeparams GOEXPERIMENT flag For #46477. Change-Id: Ic917272cb2cd28dcb39f173b3cdcfb72e52eae2d Reviewed-on: https://go-review.googlesource.com/c/go/+/586955 Reviewed-by: Robert Griesemer Reviewed-by: Austin Clements LUCI-TryBot-Result: Go LUCI Auto-Submit: Robert Griesemer --- diff --git a/src/internal/goexperiment/exp_aliastypeparams_off.go b/src/internal/goexperiment/exp_aliastypeparams_off.go new file mode 100644 index 0000000000..620d34ec79 --- /dev/null +++ b/src/internal/goexperiment/exp_aliastypeparams_off.go @@ -0,0 +1,8 @@ +// Code generated by mkconsts.go. DO NOT EDIT. + +//go:build !goexperiment.aliastypeparams + +package goexperiment + +const AliasTypeParams = false +const AliasTypeParamsInt = 0 diff --git a/src/internal/goexperiment/exp_aliastypeparams_on.go b/src/internal/goexperiment/exp_aliastypeparams_on.go new file mode 100644 index 0000000000..8f6872cdcd --- /dev/null +++ b/src/internal/goexperiment/exp_aliastypeparams_on.go @@ -0,0 +1,8 @@ +// Code generated by mkconsts.go. DO NOT EDIT. + +//go:build goexperiment.aliastypeparams + +package goexperiment + +const AliasTypeParams = true +const AliasTypeParamsInt = 1 diff --git a/src/internal/goexperiment/flags.go b/src/internal/goexperiment/flags.go index 7f6c223ed6..3f9c5af68e 100644 --- a/src/internal/goexperiment/flags.go +++ b/src/internal/goexperiment/flags.go @@ -110,4 +110,9 @@ type Flags struct { // RangeFunc enables range over func. RangeFunc bool + + // AliasTypeParams enables type parameters for alias types. + // Requires that gotypesalias=1 is set with GODEBUG. + // This flag will be removed with Go 1.24. + AliasTypeParams bool }