From d72f2de9a2f54e3e84fbc93068686ffccb0137a4 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 27 Jan 2010 18:28:13 -0800 Subject: [PATCH] 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 --- src/pkg/go/parser/parser.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pkg/go/parser/parser.go b/src/pkg/go/parser/parser.go index 181ac65046..76e9783637 100644 --- a/src/pkg/go/parser/parser.go +++ b/src/pkg/go/parser/parser.go @@ -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 }