Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
awesomify sink context warning text
  • Loading branch information
moritz committed Feb 19, 2013
1 parent 80f788b commit 2f210be
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Perl6/Optimizer.pm
Expand Up @@ -309,8 +309,9 @@ class Perl6::Optimizer {
nqp::substr($m.orig, $from, $to - $from);
}
if $op.node && $*VOID_CONTEXT && !$*IN_DECLARATION {
my str $text := nqp::escape(widen($op.node));
self.add_worry($op, qq[Useless use of expression "$text" in sink context]);
my str $op_txt := nqp::escape($op.node.Str);
my str $expr := nqp::escape(widen($op.node));
self.add_worry($op, qq[Useless use of "$op_txt" in expression "$expr" in sink context]);
}
# check if all arguments are known at compile time
my $all_args_known := 1;
Expand Down

0 comments on commit 2f210be

Please sign in to comment.