Commit 172f2765 authored by Dmitry Vyukov's avatar Dmitry Vyukov

go/ast: fix formatting of error message

There are three problems:
1. There is no CR at the end of the message.
2. The message is unconditionally printed.
3. The message is printed to stdout.

Change-Id: Ib2d880eea03348e8a69720aad7752302a75bd277
Reviewed-on: https://go-review.googlesource.com/9622Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent fbb4c745
......@@ -361,8 +361,7 @@ func Walk(v Visitor, node Node) {
}
default:
fmt.Printf("ast.Walk: unexpected node type %T", n)
panic("ast.Walk")
panic(fmt.Sprintf("ast.Walk: unexpected node type %T", n))
}
v.Visit(nil)
......
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