ansman
04/21/2022, 3:57 PMCollection.size isn’t defined at runtime and calls to it returns undefined which in turn causes most things that uses collections to fail. I’m guessing it will be very hard for me to have a reproducer since this can’t possibly happen in most cases or the tests for the compiler would have caught them. Does this sound familiar to anyone else?ansman
04/21/2022, 3:58 PMassertEquals(list1.size, list2.size)Luc Girardin
04/21/2022, 3:59 PMansman
04/21/2022, 3:59 PMansman
04/21/2022, 3:59 PMkotlin.js.ir.output.granularity=whole-program seems to help with some of the issuesansman
04/21/2022, 3:59 PMansman
04/21/2022, 4:00 PMExpected <null>, actual <20>.ansman
04/21/2022, 4:01 PMvar tmp = list1.size;
var tmp_0 = list2._get_size__809037418_ddoh9m_k$();Luc Girardin
04/21/2022, 4:01 PMansman
04/21/2022, 4:03 PMlist1 is a class that I’ve created called CollectionWrapper which implements Collection but I don’t see it actually extend the prototype anywhere in the generated JS codeansman
04/21/2022, 4:05 PMdefineProperty calls for things declared in an interfaceansman
04/21/2022, 4:15 PMKarel Petránek
04/21/2022, 4:26 PMJsName annotations on the overridden methods/properties. Note that Kotlin will complain that JsName cannot be used that way so you also have to Suppress("JS_NAME_PROHIBITED_FOR_OVERRIDE"). It’s silly that this needs to be done but at least helps to work around the issue until a proper fix arrives.ansman
04/21/2022, 4:28 PMansman
04/21/2022, 4:29 PMansman
04/21/2022, 4:33 PMansman
04/21/2022, 4:34 PMansman
04/21/2022, 4:35 PMKarel Petránek
04/21/2022, 4:39 PMMichael Friend
04/21/2022, 4:41 PMMichael Friend
04/21/2022, 4:42 PMansman
04/21/2022, 5:16 PMNSArray or List in iOS or AndroidMichael Friend
04/21/2022, 5:22 PM