Skip to content

Commit

Permalink
Revert "optimize postfix incr to prefix when unwanted"
Browse files Browse the repository at this point in the history
This reverts commit d98ccea.

See issue #1315.
  • Loading branch information
AlexDaniel committed Dec 16, 2017
1 parent 1da698a commit 8159e38
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/Perl6/Actions.nqp
Expand Up @@ -254,8 +254,6 @@ sub unwanted($ast, $by) {
if $ast.name eq '&infix:<,>' || $ast.name eq '&infix:<xx>' {
UNWANTALL($ast,$byby);
}
elsif $ast.name eq '&postfix:<++>' { $ast.name('&prefix:<++>') }
elsif $ast.name eq '&postfix:<-->' { $ast.name('&prefix:<-->') }
elsif $ast.name eq '&term:<now>' {
$ast.node.worry("Useless use of 'now' in sink context");
}
Expand Down Expand Up @@ -379,8 +377,6 @@ sub unwanted($ast, $by) {
$node.node.worry("Useless use of $sym in sink context");
}
}
elsif $node.name eq '&postfix:<++>' { $node.name('&prefix:<++>') }
elsif $node.name eq '&postfix:<-->' { $node.name('&prefix:<-->') }
elsif $node.name eq '&term:<now>' {
$node.annotate('useless', "'now'");
$node.node.worry("Useless use of 'now' in sink context");
Expand Down

0 comments on commit 8159e38

Please sign in to comment.