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
Version: 7.6.0 Platform: Darwin 16.5.0 Darwin Kernel Version 16.5.0: Fri Mar 3 16:52:33 PST 2017; root:xnu-3789.51.2~3/RELEASE_X86_64 x86_64
functionfoo(){return{};}var[x,y]=foo();// error claims that foo is not a function
Here is the error:
TypeError: foo is not a function
at repl:1:13
at ContextifyScript.Script.runInThisContext (vm.js:23:33)
at REPLServer.defaultEval (repl.js:334:29)
at bound (domain.js:280:14)
at REPLServer.runBound [as eval] (domain.js:293:12)
at REPLServer.onLine (repl.js:531:10)
at emitOne (events.js:101:20)
at REPLServer.emit (events.js:189:7)
at REPLServer.Interface._onLine (readline.js:238:10)
at REPLServer.Interface._line (readline.js:582:8)
This is a rather confusing output. In this example it's trivial to spot the problem, but I stumbled upon it in a more complex situation using argument destructuring and async functions inside a class. I was getting an error that read TypeError: undefined is not a function (because ES6 class methods are %s printed as undefined). A nicer error message would be helpful.
The text was updated successfully, but these errors were encountered:
@aneilbaboo I see you've reached out to the v8 issue tracker, so I will go ahead and close this issue for now, but fill free to ask any questions here if you need.
Version: 7.6.0
Platform: Darwin 16.5.0 Darwin Kernel Version 16.5.0: Fri Mar 3 16:52:33 PST 2017; root:xnu-3789.51.2~3/RELEASE_X86_64 x86_64
Here is the error:
This is a rather confusing output. In this example it's trivial to spot the problem, but I stumbled upon it in a more complex situation using argument destructuring and async functions inside a class. I was getting an error that read
TypeError: undefined is not a function
(because ES6 class methods are %s printed as undefined). A nicer error message would be helpful.The text was updated successfully, but these errors were encountered: