Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

warn on is rw/readonly on private attributes

  • Loading branch information...
commit 7378b2ae5131d5c364e0b6af58af1d6458aa2c2b 1 parent c37dfc7
@timo timo authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  src/core/traits.pm
View
2  src/core/traits.pm
@@ -69,9 +69,11 @@ multi trait_mod:<is>(Attribute:D $attr, |c ) {
}
multi trait_mod:<is>(Attribute:D $attr, :$rw!) {
$attr.set_rw();
+ warn "useless use of 'is rw' on $attr.name()" unless $attr.has_accessor;
}
multi trait_mod:<is>(Attribute:D $attr, :$readonly!) {
$attr.set_readonly();
+ warn "useless use of 'is readonly' on $attr.name()" unless $attr.has_accessor;
}
multi trait_mod:<is>(Attribute:D $attr, :$box_target!) {
$attr.set_box_target();
Please sign in to comment.
Something went wrong with that request. Please try again.