Created
December 17, 2012 20:16
-
-
Save FROGGS/4321746 to your computer and use it in GitHub Desktop.
Merge globals bug in rakudo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Bar; | |
multi trait_mod:<is>(Routine $r, :$bar!) is export { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Foo; | |
multi trait_mod:<is>(Routine $r, :$foo!) is export { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Foo; | |
use Bar; | |
sub a is foo { }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Foo; | |
sub a is foo { }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Merging global symbols does not work for multi trait_mods.
So if you try to import two trait_mods with different signatures, the program dies rather than add the signatures to the dispatcher list.
First step is to comment out the line 269 in rakudo/src/Perl6/World.pm:
After that your test script wont die anymore, but you get the trait_mods from perl core and the module you importet last. But you obviously should get the trait_mods from core and both modules.