Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add a DEPRECATED trait, mark Cool.bytes as DEPRECATED.
Doesn't do anything just yet; but provides a small framework that
we can build upon in the future.
  • Loading branch information
pmichaud committed Jun 30, 2012
1 parent 5ae28cc commit a6d08c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Cool.pm
Expand Up @@ -56,7 +56,7 @@ my class Cool {

## string methods

method bytes() {
method bytes() is DEPRECATED {
nqp::p6box_i(pir::bytelength__IS(nqp::unbox_s(self.Str)));
}

Expand Down
3 changes: 3 additions & 0 deletions src/core/traits.pm
Expand Up @@ -52,6 +52,9 @@ multi trait_mod:<is>(Routine:D $r, :$rw!) {
multi trait_mod:<is>(Routine:D $r, :$default!) {
$r does role { method default() { True } }
}
multi trait_mod:<is>(Routine:D $r, :$DEPRECATED!) {
# we'll add logic here later
}
multi trait_mod:<is>(Routine:D $r, :$inlinable!) {
$r.set_inline_info($inlinable);
}
Expand Down

0 comments on commit a6d08c3

Please sign in to comment.