Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make 'winner' a compile time deprecation
  • Loading branch information
lizmat committed May 19, 2015
1 parent 236b089 commit 8ab32b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
9 changes: 6 additions & 3 deletions src/Perl6/Actions.nqp
Expand Up @@ -1359,15 +1359,18 @@ Compilation unit '$file' contained the following violations:
make when_handler_helper($<block>.ast);
}

method term:sym<winner>($/) { self.term:sym<earliest>($/,'&WINNER') }
method term:sym<earliest>($/, $name = '&EARLIEST') {
method term:sym<winner>($/) {
$*W.DEPRECATED($/,"'earliest'",'2014.10','2015.09',:what("'winner'"));
self.term:sym<earliest>($/);
}
method term:sym<earliest>($/) {
my @inner_statements := $<xblock><pblock><blockoid><statementlist><statement>;
my $wild_done;
my $wild_more;
my $wait;
my $wait_time;

my $past := QAST::Op.new( :op('call'), :$name, :node($/) );
my $past := QAST::Op.new( :op('call'), :name('&EARLIEST'), :node($/) );
if $<xblock> {
if nqp::istype($<xblock><EXPR>.ast.returns, $*W.find_symbol(['Whatever'])) {
$past.push( QAST::Op.new(
Expand Down
5 changes: 0 additions & 5 deletions src/core/asyncops.pm
Expand Up @@ -165,9 +165,4 @@ sub EARLIEST(@earliest,*@other,:$wild_done,:$wild_more,:$wait,:$wait_time) {
$action();
}

sub WINNER(|c) {
DEPRECATED('earliest', |<2014.10 2015.09>, :what<winner>);
EARLIEST(|c);
}

# vim: ft=perl6 expandtab sw=4

0 comments on commit 8ab32b8

Please sign in to comment.