Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
One more fix that sees us able to pass all but two tests in S14-role/…
…parameterized-basic.t that we can in master; will hunt those two down tomorrow.
  • Loading branch information
jnthn committed Jan 12, 2010
1 parent f9001fa commit ca8d80b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Perl6/Compiler/Role.pm
Expand Up @@ -51,7 +51,12 @@ method finish($block) {
$decl.push(PAST::Op.new(
:pasttype('callmethod'),
:name('add_method'),
$metaclass, $meta_reg, ~$_, %methods{~$_}<code_ref>
$metaclass, $meta_reg, ~$_,
PAST::Op.new(
:pasttype('callmethod'),
:name('clone'),
%methods{~$_}<code_ref>
)
));
}

Expand Down
14 changes: 14 additions & 0 deletions src/builtins/Code.pir
Expand Up @@ -52,6 +52,20 @@ for executable objects.
.end


=item clone(do)

=cut

.sub 'clone' :method
$P0 = getattribute self, '$!do'
$P0 = clone $P0
$P1 = getattribute self, '$!multi'
$P2 = getattribute self, '$!lazy_sig_init_name'
$P3 = self.'new'($P0, $P1, $P2)
.return ($P3)
.end


=item assumming()

Returns a curried version of self.
Expand Down

0 comments on commit ca8d80b

Please sign in to comment.