mirror of
https://github.com/golang/go.git
synced 2025-10-29 15:54:14 +00:00
cmd/api: work on Windows again, and make gccgo files work a bit more
handle string and []byte conversions. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/5754082
This commit is contained in:
parent
764880e2b2
commit
e31fa68a43
3 changed files with 17 additions and 2 deletions
|
|
@ -579,7 +579,14 @@ func (w *Walker) varValueType(vi interface{}) (string, error) {
|
|||
}
|
||||
}
|
||||
// maybe a function call; maybe a conversion. Need to lookup type.
|
||||
return "", fmt.Errorf("not a known function %q", w.nodeString(v.Fun))
|
||||
// TODO(bradfitz): this is a hack, but arguably most of this tool is,
|
||||
// until the Go AST has type information.
|
||||
nodeStr := w.nodeString(v.Fun)
|
||||
switch nodeStr {
|
||||
case "string", "[]byte":
|
||||
return nodeStr, nil
|
||||
}
|
||||
return "", fmt.Errorf("not a known function %q", nodeStr)
|
||||
default:
|
||||
return "", fmt.Errorf("unknown const value type %T", vi)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue