Skip to content

Commit

Permalink
Hopefully temporary fix for Mu:D :docs caught by Routine:D |c snafu
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Jul 29, 2013
1 parent 1f026d9 commit c810036
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/core/traits.pm
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,18 @@ multi trait_mod:<is>(Mu \sym, :$export!, :$SYMBOL!) {
EXPORT_SYMBOL($SYMBOL, @tags, sym);
}


# this should be identical Mu:D, :docs, otherwise the fallback Routine:D, |c
# will catch it and declare "docs" to be an unknown trait
multi trait_mod:<is>(Routine:D $docee, :$docs!) {
$docee does role {
has $!WHY;
method WHY { $!WHY }
method set_docs($d) { $!WHY = $d }
}
$docee.set_docs($docs);
$docs.set_docee($docee);
}
multi trait_mod:<is>(Mu:D $docee, :$docs!) {
$docee does role {
has $!WHY;
Expand Down

0 comments on commit c810036

Please sign in to comment.