1
0
mirror of https://github.com/golang/go synced 2024-11-21 20:54:45 -07:00

go/parser: disable scoping code always

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
This commit is contained in:
Russ Cox 2010-01-27 18:28:13 -08:00
parent 2ee36c180c
commit d72f2de9a2

View 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
}