• That's great - a really neat. There's a lot of data hanging around inside Espruino that dump() doesn't reconstruct properly.

    So the issue is you have something like this?

    function Test() {
    Test.prototype.foo = function() {
      console.log("Hello 2");
    a = new Test();
    delete Test; // we've now lost the original 'Test'
    // outputs just:
    // var a = Object.create(a.__proto__.constructor["p­rototype"]);

    Potentially that is something I could fix in Espruino - maybe by detecting that no top-level name has been found and by making a temporary name to use? I know dump() isn't that smart at recreating objects.

    I'll make a note about this in this long-standing bug.


Avatar for Gordon @Gordon started