mirror of
https://github.com/golang/go
synced 2024-11-18 19:54:44 -07:00
go.tools/go/types: fix bad function comparison
Issue found by vet -nilfunc. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/12816044
This commit is contained in:
parent
5cbf2abd36
commit
4e1a4d9fde
@ -204,7 +204,7 @@ func (check *checker) selector(x *operand, e *ast.SelectorExpr) {
|
||||
// - imported objects are always fully initialized
|
||||
switch exp := exp.(type) {
|
||||
case *Const:
|
||||
assert(exp.Val != nil)
|
||||
assert(exp.Val() != nil)
|
||||
x.mode = constant
|
||||
x.typ = exp.typ
|
||||
x.val = exp.val
|
||||
|
Loading…
Reference in New Issue
Block a user