Rakudo: File ending with backslash silently exits with 0 status

Created on 3 Apr 2020  路  2Comments  路  Source: rakudo/rakudo

The Problem

If a raku file ends with a backslash on the last line, rakudo does nothing and silently exits with status 0 (success).

Expected Behavior

Either report a compile-time error, or treat EOF as if there's an extra newline there so it would succeed.

Steps to Reproduce

$ cat bug.raku
die "Hi";
# if there were a blank line below this, the bug would not appear \
$ perl6 bug.raku
$ echo $?
0
$ 

Environment

  • Operating system: Arch Linux
  • Compiler version (perl6 -v): This is Rakudo version 2020.02-48-g4e3e937bc built on MoarVM version 2020.02 implementing Raku 6.d.

Most helpful comment

Clearly it should continue executing the next file :-).

All 2 comments

Clearly it should continue executing the next file :-).

Was this page helpful?
0 / 5 - 0 ratings