Calling a method expecting one return value when the method returns none does not work as expected. The register should be filled with PMCNULL, or an exception should be thrown.
In stead, the register is filled with the invocant. While this allows for a nifty chaining accidental feature, this is not what is expected in these situations.
492 byte attachment from plobsing
.sub 'main' :main
# set up filehandle
$P0 = new ['FileHandle']
$P0.'puts'("null null null null null")
# expect incorrect number of parameters
$P1 = $P0.'flush'()
if_null $P1, OK
say "not ok"
# Local Variables:
# mode: pir
# fill-column: 100
# vim: expandtab shiftwidth=4 ft=pir:
test for proper nullary method return behaviour (using FileHandle.flush)
Can we get an update on the status of this ticket?
If the bug plobsing describes is real, then should we transform the patch into a test and TODO it?
Thank you very much.