|Subject:||[BUG] LTA error message on illegally post-declared label in Rakudo|
|To:||rakudobug [...] perl.org|
|From:||Carl Mäsak <cmasak [...] gmail.com>|
|Date:||Sat, 18 Jul 2015 14:04:29 +0200|
<jaffa4> m: goto b; b: ; say "hello"; <camelia> rakudo-moar 48c0ba: OUTPUT«===SORRY!=== Error while compiling /tmp/keUfxpNWaf␤Variable '&b' is not declared␤at /tmp/keUfxpNWaf:1␤------> goto ⏏b; b: ; say "hello";␤» <masak> that one could use a better error message. <masak> std: goto B; B: say "hello" <camelia> std 28329a7: OUTPUT«===SORRY!===␤Illegally post-declared type:␤ 'B' used at line 1␤Check failed␤FAILED 00:00 135m␤» <masak> right. * masak submits LTA rakudobug STD does a better job there. (It feels like it should be possible to figure out that B is a label and not a type here; I know there's a heuristic in place that says upperbase => probably a type, but we do have the label in the program in this case.) Even with "type" in the error message, STD's error message is way better than Rakudo's, since it says "Illegally post-declared", which is the real problem.