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: Robert Griesemer <gri@golang.org>
This commit is contained in:
Matthew Dempsky 2017-09-03 12:31:14 -07:00
parent 53d24f76fb
commit b2e8630f2f

View file

@ -399,7 +399,7 @@ func (p *noder) funcDecl(fun *syntax.FuncDecl) *Node {
f.Func.Endlineno = lineno
} else {
if pure_go || strings.HasPrefix(f.funcname(), "init.") {
yyerrorl(f.Pos, "missing function body for %q", f.funcname())
yyerrorl(f.Pos, "missing function body")
}
}