You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#716 motivated me to check this. The existing issue re: null and undefined are treated as the same by Lua, results in wrong semantics for special cases:
// this creates a null proto objectconsole.log(Object.create(null));// this should throw an exceptionconsole.log(Object.create(undefined));
rwaldron at nova in~/codez/javascript
$ ~/clonez/runtime/out/Release/colony object.create.js
{
}
{
}
rwaldron at nova in~/codez/javascript
$ node object.create.js
{}
/Users/rwaldron/codez/javascript/object.create.js:2
console.log(Object.create(undefined));
^
TypeError: Object prototype may only be an Object or null
at Function.create (native)
at Object.<anonymous> (/Users/rwaldron/codez/javascript/object.create.js:2:20)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:929:3
The text was updated successfully, but these errors were encountered:
#716 motivated me to check this. The existing issue re:
null
andundefined
are treated as the same by Lua, results in wrong semantics for special cases:The text was updated successfully, but these errors were encountered: