]> Cypherpunks repositories - gostls13.git/commitdiff
go/parser: disable scoping code always
authorRuss Cox <rsc@golang.org>
Thu, 28 Jan 2010 02:28:13 +0000 (18:28 -0800)
committerRuss Cox <rsc@golang.org>
Thu, 28 Jan 2010 02:28:13 +0000 (18:28 -0800)
Seems to be enabled spuriously during godoc (can't see why),
producing errors like:

parser.parseDir: src/pkg/http/server.go:159:16: 'Write' declared already at src/pkg/http/request.go:140:21 (and 4 more errors)

R=r
CC=golang-dev
https://golang.org/cl/194119

src/pkg/go/parser/parser.go

index 181ac65046f972436139141eb9c5113a68fd2dc9..76e9783637faca976e2a246afceb587fb2b5edbb 100644 (file)
@@ -81,7 +81,10 @@ func (p *parser) init(filename string, src []byte, scope *ast.Scope, mode uint)
        p.mode = mode
        p.trace = mode&Trace != 0 // for convenience (p.trace is used frequently)
        if scope != nil {
-               p.checkDecl = true
+               // Disabled for now.  Causes error with "godoc http":
+               //    parser.parseDir: src/pkg/http/server.go:159:16: 'Write' declared already at src/pkg/http/request.go:140:21 (and 4 more errors)
+
+               // p.checkDecl = true
        } else {
                scope = ast.NewScope(nil) // provide a dummy scope
        }