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
a52027a4
Commit
a52027a4
authored
Feb 17, 2012
by
Nigel Tao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: walk ast.Ellipsis values.
Fixes #2583. R=rsc, r CC=golang-dev
https://golang.org/cl/5671078
parent
3d8ebefb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
error_test.go
src/cmd/fix/error_test.go
+8
-0
fix.go
src/cmd/fix/fix.go
+1
-0
No files found.
src/cmd/fix/error_test.go
View file @
a52027a4
...
...
@@ -42,6 +42,10 @@ func g() {
error := 1
_ = error
}
func h(os.Error) {}
func i(...os.Error) {}
`
,
Out
:
`package main
...
...
@@ -59,6 +63,10 @@ func g() {
error := 1
_ = error
}
func h(error) {}
func i(...error) {}
`
,
},
{
...
...
src/cmd/fix/fix.go
View file @
a52027a4
...
...
@@ -113,6 +113,7 @@ func walkBeforeAfter(x interface{}, before, after func(interface{})) {
case
*
ast
.
BadExpr
:
case
*
ast
.
Ident
:
case
*
ast
.
Ellipsis
:
walkBeforeAfter
(
&
n
.
Elt
,
before
,
after
)
case
*
ast
.
BasicLit
:
case
*
ast
.
FuncLit
:
walkBeforeAfter
(
&
n
.
Type
,
before
,
after
)
...
...
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