aboutsummaryrefslogtreecommitdiff
path: root/src/go/internal/typeparams/notypeparams.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/go/internal/typeparams/notypeparams.go')
-rw-r--r--src/go/internal/typeparams/notypeparams.go40
1 files changed, 0 insertions, 40 deletions
diff --git a/src/go/internal/typeparams/notypeparams.go b/src/go/internal/typeparams/notypeparams.go
deleted file mode 100644
index 2ceafaac1c..0000000000
--- a/src/go/internal/typeparams/notypeparams.go
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2021 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build !typeparams
-// +build !typeparams
-
-package typeparams
-
-import (
- "go/ast"
-)
-
-const Enabled = false
-
-func PackExpr(list []ast.Expr) ast.Expr {
- switch len(list) {
- case 1:
- return list[0]
- default:
- // The parser should not attempt to pack multiple expressions into an
- // IndexExpr if type params are disabled.
- panic("multiple index expressions are unsupported without type params")
- }
-}
-
-func UnpackExpr(expr ast.Expr) []ast.Expr {
- return []ast.Expr{expr}
-}
-
-func IsListExpr(n ast.Node) bool {
- return false
-}
-
-func Get(ast.Node) *ast.FieldList {
- return nil
-}
-
-func Set(node ast.Node, params *ast.FieldList) {
-}