diff options
author | Robert Griesemer <gri@golang.org> | 2013-05-22 14:22:50 -0700 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2013-05-22 14:22:50 -0700 |
commit | 44b67d281f97a51ef845af2d4e885d4634ecdfe5 (patch) | |
tree | 196059b897269ac5b9c85005a2f4c9b237014553 /src/pkg/go/ast | |
parent | a4edd56583c9833df76cab9b1e0bc7c435cc491c (diff) | |
download | go-44b67d281f97a51ef845af2d4e885d4634ecdfe5.tar.gz |
go/doc: fix build
1) go/doc:
- create correct ast.FuncType
- use more commonly used variable names in a test case
2) make ast.FuncType.Pos robust in case of incorrect ASTs
R=golang-dev
CC=golang-dev
https://codereview.appspot.com/9651044
Diffstat (limited to 'src/pkg/go/ast')
-rw-r--r-- | src/pkg/go/ast/ast.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/go/ast/ast.go b/src/pkg/go/ast/ast.go index e8599184a..f26ff6b1a 100644 --- a/src/pkg/go/ast/ast.go +++ b/src/pkg/go/ast/ast.go @@ -439,7 +439,7 @@ func (x *KeyValueExpr) Pos() token.Pos { return x.Key.Pos() } func (x *ArrayType) Pos() token.Pos { return x.Lbrack } func (x *StructType) Pos() token.Pos { return x.Struct } func (x *FuncType) Pos() token.Pos { - if x.Func.IsValid() { + if x.Func.IsValid() || x.Params == nil { // see issue 3870 return x.Func } return x.Params.Pos() // interface method declarations have no "func" keyword |