Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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...
commit a6d08c3ec6045593c8641222382db2697bef10f2 1 parent 5ae28cc
@pmichaud pmichaud authored
Showing with 4 additions and 1 deletion.
  1. +1 −1  src/core/Cool.pm
  2. +3 −0  src/core/traits.pm
View
2  src/core/Cool.pm
@@ -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)));
}
View
3  src/core/traits.pm
@@ -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);
}
Please sign in to comment.
Something went wrong with that request. Please try again.