diff options
Diffstat (limited to 'src/go/types/type_go2go.go')
-rw-r--r-- | src/go/types/type_go2go.go | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/go/types/type_go2go.go b/src/go/types/type_go2go.go new file mode 100644 index 0000000000..082ac3bd8b --- /dev/null +++ b/src/go/types/type_go2go.go @@ -0,0 +1,27 @@ +// 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. + +package types + +// This file exposes additional API methods related to type parameters, for use +// in the go2go rewriter. + +type TypeParam = _TypeParam + +func (t *Named) TArgs() []Type { return t._TArgs() } +func (t *Named) SetTArgs(args []Type) { t._SetTArgs(args) } +func (t *Named) TParams() []*TypeName { return t._TParams() } + +func (t *Interface) HasTypeList() bool { return t._HasTypeList() } + +func (s *Signature) TParams() []*TypeName { return s._TParams() } +func (s *Signature) SetTParams(tparams []*TypeName) { s._SetTParams(tparams) } + +func AsPointer(t Type) *Pointer { + return asPointer(t) +} + +func AsStruct(t Type) *Struct { + return asStruct(t) +} |