-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhack.go
36 lines (27 loc) · 833 Bytes
/
hack.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package gospec
import (
"go/ast"
"go/constant"
"go/types"
_ "unsafe"
)
//go:linkname _assignment go/types.(*Checker).assignment
func _assignment(checker *types.Checker, x *operand, T types.Type, context string)
//go:linkname _representable go/types.(*Checker).representable
func _representable(checker *types.Checker, x *operand, typ *types.Basic)
//go:linkname _conversion go/types.(*Checker).conversion
func _conversion(checker *types.Checker, x *operand, T types.Type)
//go:linkname isNamed go/types.isNamed
func isNamed(typ types.Type) bool
//must be kept in sync with operand in src/go/types/operand.go
type operand struct {
mode operandMode
expr ast.Expr
typ types.Type
val constant.Value
id builtinId
}
type operandMode byte
type builtinId int
const constant_ operandMode = 4
const value operandMode = 7