From: David Given Date: Sun, 8 Jan 2017 10:25:57 +0000 (+0100) Subject: Improve confusing error message when calling function procedures from a X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=612e14b4b40098cdbb16a0567cb357944337c772;p=ack.git Improve confusing error message when calling function procedures from a top-level statement. Fixes: #30 --- diff --git a/lang/m2/comp/walk.c b/lang/m2/comp/walk.c index b51316802..b36dbc8f0 100644 --- a/lang/m2/comp/walk.c +++ b/lang/m2/comp/walk.c @@ -676,7 +676,8 @@ label exit_label; assert(nd == nd1); if (nd->nd_type != 0) { - node_error(nd, "procedure call expected instead of function call"); + node_error(nd, "only proper procedures can be called from top-level " + "statement; this is a function procedure"); break; } CodeCall(nd);