Source file
src/go/types/api_typeparams.go
1
2
3
4
5
6
7
8 package types
9
10 import (
11 "go/ast"
12 )
13
14 type (
15 Inferred = _Inferred
16 Sum = _Sum
17 TypeParam = _TypeParam
18 )
19
20 func NewSum(types []Type) Type { return _NewSum(types) }
21
22 func (s *Signature) TParams() []*TypeName { return s._TParams() }
23 func (s *Signature) SetTParams(tparams []*TypeName) { s._SetTParams(tparams) }
24
25 func (t *Interface) HasTypeList() bool { return t._HasTypeList() }
26 func (t *Interface) IsComparable() bool { return t._IsComparable() }
27 func (t *Interface) IsConstraint() bool { return t._IsConstraint() }
28
29 func (t *Named) TParams() []*TypeName { return t._TParams() }
30 func (t *Named) TArgs() []Type { return t._TArgs() }
31 func (t *Named) SetTArgs(args []Type) { t._SetTArgs(args) }
32
33
34 type Info struct {
35 Types map[ast.Expr]TypeAndValue
36
37
38
39
40
41 Inferred map[ast.Expr]_Inferred
42
43 Defs map[*ast.Ident]Object
44 Uses map[*ast.Ident]Object
45 Implicits map[ast.Node]Object
46 Selections map[*ast.SelectorExpr]*Selection
47 Scopes map[ast.Node]*Scope
48 InitOrder []*Initializer
49 }
50
51 func getInferred(info *Info) map[ast.Expr]_Inferred {
52 return info.Inferred
53 }
54
View as plain text