Memory corruption bug in CodeGenTypes

Found a pretty serious issue in CodeGenTypes::ConvertNewType: it grabs
a reference to a cell in a map, modifies the map by instantiating the
members of the struct, then writes to the map. Obviously, this is not
a good thing...

Patch attached, although I'm not sure if it's the right way to fix this.


typesmemcorrupt.txt (2.08 KB)

This is the right way to fix it, please apply. Thanks Eli!