Join GitHub today
BEGIN phaser causes confusing error #2516
When using a BEGIN phaser to initialize an attribute in a module subject to precompiling, a confusing error is generated when the module is "use"-ed.
Create a file test.pl6:
Create a file Foo.pm6:
Same behavior as if the class was defined within test.pl6 (instead of an outside file) - no errors.
Example of working file, test-noerror.pl6:
I would expect this to work even when Foo is in a stand alone file (Foo.pm6). I expect the
Steps to Reproduce
NOTE: On older Rakudo, such as 2018.09, a different error was given:
which points to:
So I would guess that this bug has been around for a long time already, but has changed shape after the MAST refactor.