1
0
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:
Andrew Gerrand 2013-08-20 15:26:04 +10:00
parent 5cbf2abd36
commit 4e1a4d9fde

View File

@ -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