#816: PMC 'Undef' does not support logical_not
-----------------------------+----------------------------------------------
Reporter: Austin_Hastings | Type: bug
Status: new | Priority: normal
Milestone: | Component: core
Version: 1.3.0 | Severity: medium
Keywords: | Lang:
Patch: | Platform:
-----------------------------+----------------------------------------------
This code in Close:
{{{
ok(!(o.flat()), "flat: New object (undef flat) is false");
}}}
compiles to:
{{{
$P51 = o."flat"()
not $P52, $P51
"ok"($P52, "flat: New object (undef flat) is false")
}}}
And then fails, with:
{{{
logical_not() not implemented in class 'Undef'
}}}
Grepping for logical_not in *.pmc gives back only scalar.pmc.
* While I know that Perl's Undef has 0/nil/false/"" behavior, is that
right for Parrot? (To what extent is Undef just a safe Null?)
* Should there even be a 'not' opcode? We've got isfalse.
* Should other pmc types be implementing logical_not?
* Should Undef be a subclass of scalar, and so inherit?
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/816>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets