Skip to content

Commit

Permalink
our T sub foo() { ... } form of setting the return value now akshuall…
Browse files Browse the repository at this point in the history
…y sets it.
  • Loading branch information
jnthn committed Apr 19, 2009
1 parent 80f0d32 commit cc6b141
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/parser/actions.pm
Expand Up @@ -2034,6 +2034,15 @@ method scoped($/) {
$past.viviself( $( $<fulltypename>[0] ).clone() );
}
}
elsif $past.isa(PAST::Block) && $<fulltypename> {
$past.loadinit().push(PAST::Op.new(
:pasttype('call'),
:name('!sub_trait_verb'),
PAST::Var.new( :name('block'), :scope('register') ),
'trait_verb:returns',
$( $<fulltypename>[0] )
));
}
}
make $past;
}
Expand Down

0 comments on commit cc6b141

Please sign in to comment.