Looks like a bug caused by some internal optimizations. The string class is
not properly handling the possibility that it might be subclasses.

Rick

On Sat, Jun 22, 2019 at 2:08 PM Gil Barmwater <gbarmwa...@alum.rpi.edu>
wrote:

> I thought I understood how this is supposed to work but the following code
> does not do what I expected:
>
> -- is this a bug?
>     say .addDot~new(123)~makestring "(should be 123.)" -- and it is
>     say .addDot~new(456) "(should be 456.)"
> ::class addDot subclass String
> ::method makestring    return self~makestring:super || .
>
> The second say statement does not run the overriding makestring method but
> gives "456 (should be 456.)".? What am I missing here?
>
> --
> Gil Barmwater
>
> _______________________________________________
> Oorexx-devel mailing list
> Oorexx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to