Taras Glek wrote: > Benjamin Smedberg wrote: >> Taras Glek wrote: >> >> >>> I don't think it's right. Correct way would be to use prototypes and >>> instanceOf. File a bug if you agree. >>> >> >> Can I switch() on instanceof? There's also the slight problem that I'm >> mixing dehydra types and lazy treehydra reflections in this code, so I >> need >> to be able to have the lazy converter use the same API. >> > you can switch on .constructor
Can you provide a code example? I'm not clear how you'd switch on .constructor, especially with two different codebases providing the same general object types. Currently dehydra types don't have prototypes anyway, do they? Are you suggesting that I could add prototypes to these objects and add the .kind property to the prototype instead of the type object itself? --BDS _______________________________________________ Dev-static-analysis mailing list [email protected] https://lists.mozilla.org/listinfo/dev-static-analysis
