← All programs · Programs that must fail

Programs that must fail #1

≠
Rakudo 2026.08 rejects this broken program; Raku++ 5.0.0-g312cde8e runs it anyway

The program is broken on purpose, so the right behaviour is a compile-time error. Rakudo 2026.08 reports one; Raku++ 5.0.0-g312cde8e accepts the program without an error. Here the reference compiler is right. This difference is preserved as a Rakumap finding ↗

The program

my $value = 1 2;

Run executes the program in your browser, with the Raku++ build this site ships. Edit it and try variations.

What each compiler printed

Rakudo 2026.08

(printed nothing)

Raku++ 5.0.0-g312cde8e

(printed nothing)

Error messages

Rakudo 2026.08

===SORRY!=== Error while compiling invalid-00000040.raku
Two terms in a row
at invalid-00000040.raku:1
------> my $value = 1<HERE> 2;
    expecting any of:
        infix
        infix stopper
        postfix
        statement end
        statement modifier
        statement modifier loop

Raku++ 5.0.0-g312cde8e

Useless use of constant integer 2 in sink context (line 1)