1
0
mirror of https://github.com/golang/go synced 2024-11-15 02:30:31 -07:00

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 <gri@google.com>
Reviewed-by: Austin Clements <austin@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Robert Griesemer <gri@google.com>
This commit is contained in:
Robert Griesemer 2024-05-20 14:00:06 -07:00 committed by Gopher Robot
parent dbe2e757bb
commit c3591cb30c
3 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,8 @@
// Code generated by mkconsts.go. DO NOT EDIT.
//go:build !goexperiment.aliastypeparams
package goexperiment
const AliasTypeParams = false
const AliasTypeParamsInt = 0

View File

@ -0,0 +1,8 @@
// Code generated by mkconsts.go. DO NOT EDIT.
//go:build goexperiment.aliastypeparams
package goexperiment
const AliasTypeParams = true
const AliasTypeParamsInt = 1

View File

@ -110,4 +110,9 @@ type Flags struct {
// RangeFunc enables range over func. // RangeFunc enables range over func.
RangeFunc bool 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
} }