Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
3eb9adee
Commit
3eb9adee
authored
Jul 29, 2013
by
Robert Griesemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go/parser: don't report name errors if DeclarationErrors is not set
R=adonovan CC=golang-dev
https://golang.org/cl/12072043
parent
fdb69cb0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
parser.go
src/pkg/go/parser/parser.go
+1
-1
No files found.
src/pkg/go/parser/parser.go
View file @
3eb9adee
...
...
@@ -2385,7 +2385,7 @@ func (p *parser) parseFile() *ast.File {
// Go spec: The package clause is not a declaration;
// the package name does not appear in any scope.
ident
:=
p
.
parseIdent
()
if
ident
.
Name
==
"_"
{
if
ident
.
Name
==
"_"
&&
p
.
mode
&
DeclarationErrors
!=
0
{
p
.
error
(
p
.
pos
,
"invalid package name _"
)
}
p
.
expectSemi
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment