Skip to content

Commit

Permalink
Make is default on routines work earlier in setting
Browse files Browse the repository at this point in the history
Sometimes it's needed but the `does` op it's using is defined
late in the setting.

Mix in the marker role directly using .^mixin instead.
  • Loading branch information
zoffixznet committed Oct 11, 2017
1 parent a72214c commit fbae69e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/traits.pm
Expand Up @@ -141,7 +141,7 @@ multi sub trait_mod:<is>(Routine:D $r, :$raw!) {
$r.set_rw(); # for now, until we have real raw handling
}
multi sub trait_mod:<is>(Routine:D $r, :$default!) {
$r does role { method default(--> True) { } }
$r.^mixin: role { method default(--> True) { } }
}
multi sub trait_mod:<is>(Routine:D $r, :$DEPRECATED!) {
my $new := nqp::istype($DEPRECATED,Bool)
Expand Down

0 comments on commit fbae69e

Please sign in to comment.