Bug 108536 - optional identifier of function expressions is ignored
Summary: optional identifier of function expressions is ignored
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: kjs (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-04 14:50 UTC by Florian Loitsch
Modified: 2007-02-10 21:55 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
first testcase using the optional identifier of function expressions. (197 bytes, text/plain)
2005-07-04 14:53 UTC, Florian Loitsch
Details
second testcase (165 bytes, text/plain)
2005-07-04 15:03 UTC, Florian Loitsch
Details

Note You need to log in before you can comment on or make changes to this bug.
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.