Commit b2e8630f authored by Matthew Dempsky's avatar Matthew Dempsky

cmd/compile: simplify "missing function body" error message

Fixes #21747.

Change-Id: I6a68370be3b7510ce364ddd1e41a1d767ce3a67f
Reviewed-on: https://go-review.googlesource.com/61311
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
parent 53d24f76
...@@ -399,7 +399,7 @@ func (p *noder) funcDecl(fun *syntax.FuncDecl) *Node { ...@@ -399,7 +399,7 @@ func (p *noder) funcDecl(fun *syntax.FuncDecl) *Node {
f.Func.Endlineno = lineno f.Func.Endlineno = lineno
} else { } else {
if pure_go || strings.HasPrefix(f.funcname(), "init.") { if pure_go || strings.HasPrefix(f.funcname(), "init.") {
yyerrorl(f.Pos, "missing function body for %q", f.funcname()) yyerrorl(f.Pos, "missing function body")
} }
} }
......
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