Bug 108536

Summary: optional identifier of function expressions is ignored
Product: [Applications] konqueror Reporter: Florian Loitsch <florian>
Component: kjsAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: first testcase using the optional identifier of function expressions.
second testcase

Description Florian Loitsch 2005-07-04 14:50:51 UTC
Version:            (using KDE KDE 3.4.0)
Installed from:    Unlisted Binary Package
OS:                Linux

Javascript allows function expressions to have optional
identifiers only visible within the function (Ecmascript Section 13):
var f = function foo(x) {/*foo is only visible in here*/};

Konqueror seems to ignore this optional identifier.
I will attach 2 simple examples.
Comment 1 Florian Loitsch 2005-07-04 14:53:46 UTC
Created attachment 11675 [details]
first testcase using the optional identifier of function expressions.

inside f, the function h calls itself recursively using "g".
The result should be "done" and "g". and not "g" and "g", as my current
version prints.
Comment 2 Florian Loitsch 2005-07-04 15:03:47 UTC
Created attachment 11676 [details]
second testcase

the current version "bugs" on this example...
Comment 3 Harri Porten 2007-02-10 21:55:01 UTC
Was already fixed in trunk for KDE 4. Slightly different solution has been implemented for KDE 3.5.7.