Commit d72f2de9 authored by Russ Cox's avatar Russ Cox

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
parent 2ee36c18
...@@ -81,7 +81,10 @@ func (p *parser) init(filename string, src []byte, scope *ast.Scope, mode uint) ...@@ -81,7 +81,10 @@ func (p *parser) init(filename string, src []byte, scope *ast.Scope, mode uint)
p.mode = mode p.mode = mode
p.trace = mode&Trace != 0 // for convenience (p.trace is used frequently) p.trace = mode&Trace != 0 // for convenience (p.trace is used frequently)
if scope != nil { 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 { } else {
scope = ast.NewScope(nil) // provide a dummy scope scope = ast.NewScope(nil) // provide a dummy scope
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment