← All programs · Programs that must fail

Programs that must fail #6

≠
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

class C { method 42() { } }

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-00000045.raku
Missing block
at invalid-00000045.raku:1
------> class C { method<HERE> 42() { } }

Raku++ 5.0.0-g312cde8e

(no error — the program ran to the end)