I will look into it today. Unfortunately the instance level 'plus' method is not suitable for the general case, because an XMLList reference can also be null which would cause an error in the generated js code that would not be present in AVM, although this is an edge case. But it does mean that for the general case, if there is not native support via valueOf or toString etc, then it is better to route things through a static method that covers the edge cases.
On Tue, Jul 5, 2022 at 8:26 AM Harbs <harbs.li...@gmail.com> wrote: > It looks like BinaryOperatorEmitter is supposed to be emitting .plus(), > but it doesn’t seem to be doing so… > > Harbs > > > On Jul 4, 2022, at 6:32 PM, Harbs <harbs.li...@gmail.com> wrote: > > > > The logic should be something like this in pseudocode: > > > > if(isPlus && (isXMLish(righthand) || isXMLish(leftHand){ > > if(isXM<Lish(leftHand){ > > //output lefthand.plus(righthand) > > }else{ > > // output righthand.plus(lefthand) > > } > > > >> On Jul 4, 2022, at 6:25 PM, Harbs <harbs.li...@gmail.com <mailto: > harbs.li...@gmail.com>> wrote: > >> > >> I think the compiler should be using the “plus” XML method for string > concatenation of XML. > >> > >>> On Jul 4, 2022, at 5:36 PM, Greg Dove <greg.d...@gmail.com <mailto: > greg.d...@gmail.com>> wrote: > >>> > >>> (it does equal undefined), but it > >>> seems it does concatenate as an empty string. > >> > > > >