Skip to content

Commit

Permalink
The type-object case of infix:<but> need not .clone().
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Dec 17, 2011
1 parent b57f60e commit 40091ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/operators.pm
Expand Up @@ -28,7 +28,7 @@ multi infix:<but>(Mu:D \$obj, Mu:U \$role) {
$obj.HOW.mixin($obj.clone(), $role).BUILD_LEAST_DERIVED({});
}
multi infix:<but>(Mu:U \$obj, Mu:U \$role) {
$obj.HOW.mixin($obj.clone(), $role);
$obj.HOW.mixin($obj, $role);
}
multi infix:<but>(Mu \$obj, Mu:D $val) is rw {
my $role := Metamodel::ParametricRoleHOW.new_type();
Expand All @@ -44,7 +44,7 @@ multi infix:<but>(Mu:D \$obj, @roles) {
$obj.HOW.mixin($obj.clone(), |@roles).BUILD_LEAST_DERIVED({});
}
multi infix:<but>(Mu:U \$obj, @roles) {
$obj.HOW.mixin($obj.clone(), |@roles)
$obj.HOW.mixin($obj, |@roles)
}

sub SEQUENCE($left, $right, :$exclude_end) {
Expand Down

0 comments on commit 40091ee

Please sign in to comment.