The compiler sees Qname as having a single constructor with two params of type ‘*’.
I don’t know what trick was used to get ASDoc to show two constructors. HTH, -Alex On 11/11/15, 9:37 AM, "Alex Harui" <aha...@adobe.com> wrote: > > >On 11/11/15, 3:02 AM, "Harbs" <harbs.li...@gmail.com> wrote: > >>IFAIK, ActionScript does not have multiple constructors. I’m wondering if >>there’s any way to simulate multiple constructors when cross-compiling to >>js. >> >>What prompted my questions is QName. QName has two different >>constructors. One takes a QName object, and the other takes uri and a >>localName. I was windering if there’s a way to get that effect with >>type-checking. The only way I can think of to support that would be to >>take a wildcard argument for the first argument (and do runtime checking) >>and make the second one optional. >> >>Does anyone have better ideas? > >That’s interesting. I’m going to spend some time trying to figure out how >Qname is defined in PlayerGlobal. >