Skip to content

Commit

Permalink
Make "is DEPRECATED" introspectable on Routines
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Dec 2, 2020
1 parent 80f9283 commit 0d1c8a8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core.c/traits.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ multi sub trait_mod:<is>(Attribute:D $attr, :$DEPRECATED!) {
my $new := nqp::istype($DEPRECATED,Bool)
?? "something else"
!! $DEPRECATED;
role is-DEPRECATED { has $.DEPRECATED }
my role is-DEPRECATED { has $.DEPRECATED }
$attr does is-DEPRECATED($new);
}
multi sub trait_mod:<is>(Attribute:D $attr, :$leading_docs!) {
Expand Down Expand Up @@ -175,6 +175,8 @@ multi sub trait_mod:<is>(Routine:D $r, :$DEPRECATED!) {
my $new := nqp::istype($DEPRECATED,Bool)
?? "something else"
!! $DEPRECATED;
my role is-DEPRECATED { has $.DEPRECATED }
$r does is-DEPRECATED($new);
$r.add_phaser( 'ENTER', -> { Rakudo::Deprecations.DEPRECATED($new) } );
}
multi sub trait_mod:<is>(Routine:D $r, Mu :$inlinable!) {
Expand Down

0 comments on commit 0d1c8a8

Please sign in to comment.