#696: Can't assign an object to Undef.
-------------------------+--------------------------------------------------
Reporter: coke | Owner: whiteknight
Type: bug | Status: closed
Priority: normal | Milestone:
Component: none | Version: 1.2.0
Severity: medium | Resolution: fixed
Keywords: tcl blocker | Lang:
Patch: | Platform:
-------------------------+--------------------------------------------------
Comment(by pmichaud):
Replying to [comment:3 whiteknight]:
> Okay, we looked at this for a while tonight, and here's what Allison++
came up with:
>
> {{{
> <allison> Whiteknight: okay, here's my recommendation:
> <allison> Whiteknight: take the contents of the 'clone' vtable function
in src/pmc/object.pmc and change them into a function in src/oo.c named
Parrot_oo_clone_object
> <allison> Whiteknight: make the function take an optional PMC argument,
the destination of the clone
> <allison> Whiteknight: when the (optional) destination PMC is passed,
morph it to the object type, when it's not passed, create a new object
> <allison> Whiteknight: otherwise, the behavior is the same as Object
PMC's 'clone
> }}}
For whatever it's worth, the above description sounds an awful lot like
the behavior of the 'copy' opcode (which was created precisely to
workaround the problems of assigning to existing PMCs such as Undef).
Pm
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/696#comment:6>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets