Espruino/tests/test_object_proto_2.js
2014-05-22 16:27:28 +01:00

13 lines
229 B
JavaScript

// https://github.com/espruino/Espruino/issues/102
function X() {}
X.prototype.foo = function() {}
var x = new X()
X.prototype = { bar : function() {} };
var a = x.foo;
var b = x.bar;
result = a!==undefined && b===undefined;