mirror of
https://github.com/golang/go
synced 2024-11-25 05:07:56 -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:
parent
2ee36c180c
commit
d72f2de9a2
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user