# New Ticket Created by  Alex Jakimenko 
# Please include the string:  [perl #125812]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=125812 >


Code:
with(1) { }

Result:
===SORRY!=== Error while compiling ./test.pl
Unexpected block in infix position (missing statement control word before
the expression?)
at ./test.pl:2
------> with(1)⏏ { }
    expecting any of:
        infix
        infix stopper

It looks like “with” and “without” are missing some checks, unlike “if”,
“unless”. Here is what happens if you use if:
===SORRY!===
Word 'if' interpreted as 'if()' function call; please use whitespace
instead of parens
at ./test.pl:2
------> if⏏(1) { }
Unexpected block in infix position (two terms in a row)
at ./test.pl:2
------> if(1)⏏ { }

In other words, “with” and “without” should produce same error message
about whitespace.

IRC log: http://irclog.perlgeek.de/perl6/2015-08-15#i_11061258

Reply via email to