Ticket #816 (new bug)
PMC 'Undef' does not support logical_not
Reported by: | Austin_Hastings | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | core | Version: | 1.3.0 |
Severity: | medium | Keywords: | |
Cc: | Language: | ||
Patch status: | Platform: |
Description
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?
Change History
Note: See
TracTickets for help on using
tickets.