Problem with List<T>.Insert in WebAssembly

Elements 11.0.0.2681

Hi,

There is a strange problem when you repeatedly call Insert on a List - after few subsequent calls (depends on the indices you insert on and the length of the list) “empty” values start to appear (i.e. zero if T is Integer, nil if T is Object etc.). Here’s a simple test case:

    method Main;
    begin
      var lst : List<Integer> := new List<Integer>();
      lst.Add(1);
      lst.Add(1);
      lst.Insert(1, 1);
      lst.Insert(1, 1);
      lst.Insert(1, 1);
      lst.Insert(1, 1);
      lst.Insert(1, 1);
      assert(lst[3] = 1); //ERROR, lst[3] is zero
    end;

Very curious… ill log a bug.

Logged as bugs://E25470.

bugs://E25470 was closed as fixed.