2

Closed

Local Function Names bug

description

Javascript allows local function names.
i.e. var f = function MyLocalFunctionName() {}

This is very good because when you debug in VS2008 it says "MyLocalFunctionName" on the callstack rather than "Javascript anonymous code"

Currently this seems not to be supported by Jint
Closed Oct 3, 2014 at 6:43 PM by sebastienros
Jint has been rewritten and this issue should be fixed in the new version. Please check it on https://github.com/sebastienros/jint or on using the nuget package here: https://www.nuget.org/packages/Jint/

comments

sebastienros wrote Nov 15, 2009 at 5:26 PM

Do you mean that this issue occurs with Jint Debugger's Call Stack ? I don't see the bug. Could you provide a code sample with the expected and actual value ?

kaneter wrote Nov 15, 2009 at 6:05 PM

Code:
var f = function MyLocalFunctionName() {}

Expected result:
The function object should be stored in f now, with an extra attribute giving a "name" (MyLocalFunctionName) to the function, rather than being anonymous.

Actual result:
extraneous input 'MyLocalFunctionName' expecting LPAREN at line 1:17