Announcement

Collapse
No announcement yet.

Issue creating generic type inside of manually loaded module

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Issue creating generic type inside of manually loaded module

    I have been experimenting with doing code splitting in our Bridge app, and am running into errors inside of manually loaded modules. The error seems to be related to how generic types are being lazily defined.

    In my case, from within the manually loaded module, I create an instance of Dictionary<Type, object>. If I try to add an item to the dictionary, an error occurs:
    Cannot read property 'getHashCode2' of undefined

    I noticed when the instance is being created, the dictionary's comparer is not being initialized correctly (System.Collections.Generic.EqualityComparer$1(TKe y).def).

    Since it is an issue with modules, I was not able to reproduce on Deck. I have a small project that demonstrates the issue, though I can't seem to attach it here. I would be happy to share the repro, just let me know the best way to get it to you.
Working...
X