[TS] Fix generation for traits that have supertraits
authorMatt Corallo <git@bluematt.me>
Mon, 3 Oct 2022 20:07:28 +0000 (20:07 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 3 Oct 2022 20:38:23 +0000 (20:38 +0000)
commitd49139b59dab2df2b92ceed54386be652c9b1cb2
treea0b9b463baa02b6fff5aad577e6ef1fec09ab6f6
parent661b986218f97a6d6162ddd19f3c0d48253a63ff
[TS] Fix generation for traits that have supertraits

When we have a trait with a supertrait, we have to pass both the
main- and super-trait instance indxes through to C so that it can
call both. We failed to do this, missing an argument entirely when
calling the C code.

Instead of trying to allocate a new instance index, we opt to store
instance indexes in trait structs (assuming there is one) and then
reuse the one in the constructed object.
typescript_strings.py