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


The blockless form of 'with' works as expected on JVM, but there are
some wrong results if there is a block attached to a 'with' condition:

<bartolin>  r: say 42 with Empty
<camelia>   rakudo-moar aac9ef, rakudo-jvm fb4f16: ( no output )

<bartolin>  r: with Empty { say 42 }
<camelia>   rakudo-moar aac9ef: ( no output )
<camelia>   ..rakudo-jvm fb4f16: OUTPUT«42␤»

Same thing happens with Failure and an actual Failure:

<bartolin>  r: with Failure.new { say 42 }
<camelia>   rakudo-moar aac9ef: ( no output )
<camelia>   ..rakudo-jvm fb4f16: OUTPUT«42␤»

<bartolin>  r: say 42 with Failure.new
<camelia>   rakudo-moar aac9ef, rakudo-jvm fb4f16: ( no output )

There are fudged tests in S04-statements/with.t for this problem and a
newly added test in S03-smartmatch/any-num.t fails for the same
reason. I'm going to add the number of this ticket to those tests.

Reply via email to