tvcutsem / harmony-reflect

ES5 shim for ES6 Reflect and Proxy objects
http://www.ecma-international.org/ecma-262/6.0/#sec-reflection
Other
478 stars 48 forks source link

harmony-reflect borks node repl #67

Closed dbo closed 8 years ago

dbo commented 8 years ago

Installing harmony-reflect (version 1.4.2) in a node repl crashes it on TAB completion:

$ node --harmony_proxies
> require("harmony-reflect")
{ getOwnPropertyDescriptor: [Function],
  defineProperty: [Function],
  deleteProperty: [Function],
  getPrototypeOf: [Function],
  setPrototypeOf: [Function],
  preventExtensions: [Function],
  isExtensible: [Function],
  has: [Function],
  get: [Function],
  set: [Function],
  enumerate: [Function],
  ownKeys: [Function],
  apply: [Function],
  construct: [Function] }
> ** pressing TAB key **  readline.js:925
            throw err;
            ^

TypeError: Object prototype may only be an Object or null: true
    at setPrototypeOf (native)
    at Function.Object.setPrototypeOf (.../node_modules/harmony-reflect/reflect.js:1655:14)
    at Object.prim_defineProperty.set (.../node_modules/harmony-reflect/reflect.js:1634:21)
    at completionGroupsLoaded (repl.js:875:21)
    at REPLServer.complete (repl.js:767:11)
    at REPLServer.complete [as completer] (repl.js:315:10)
    at REPLServer.Interface._tabComplete (readline.js:375:8)
    at REPLServer.Interface._ttyWrite (readline.js:872:16)
    at ReadStream.onkeypress (readline.js:106:10)
    at emitTwo (events.js:100:13)
$ node -v
v5.5.0