You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[TS] Handle constructors in the list of methods #319
We need to carefully handle the presence of the constructor in the list of methods (EtsClass::methods).
If we receive the IR (from AA) where methods contain a non-empty constructor, we are good.
If there is no explicit constructor in the TS class, AA will create --- in the most cases --- an empty one (on their side, it is also marked as "synthetic"), and we will receive it via IR.
However, sometimes there is no constructor among methods in the IR. We handle this inside EtsClass::ctor by searching for the method called constructor among the methods, and if there is no such method, we return (in val ctor) a newly (lazily cached) created one. Probably we should consider adding this newly created ctor in methods list. Or better just ensure that methods list contains the constructor (or put a synthetic one) during the initialization of EtsClassImpl.
Activity