From: Matthew Dempsky Date: Sun, 3 Sep 2017 19:31:14 +0000 (-0700) Subject: cmd/compile: simplify "missing function body" error message X-Git-Tag: go1.10beta1~1225 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b2e8630f2f8120f917b8e6d3e2a88ee6046da569;p=gostls13.git 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 TryBot-Result: Gobot Gobot Reviewed-by: Robert Griesemer --- diff --git a/src/cmd/compile/internal/gc/noder.go b/src/cmd/compile/internal/gc/noder.go index f4089599fe..ed1b2fd565 100644 --- a/src/cmd/compile/internal/gc/noder.go +++ b/src/cmd/compile/internal/gc/noder.go @@ -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") } }