Bug 15491 - function.prototype is undefined : ECMAScript compliance bug
Summary: function.prototype is undefined : ECMAScript compliance bug
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL: javascript:alert( parseInt.prototype )
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-13 10:36 PDT by Garrett Smith
Modified: 2007-10-13 22:55 PDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Garrett Smith 2007-10-13 10:36:01 PDT
parseInt is a function.

A prototype property is automatically created for every function.

Function().prototype; // 

parseInt does not have a prototype property. In order to be a Function, parseInt must have a prototype property. A function that does not have a prototype property does not conform to the Function interface; it should not be considered a function.

This applies to all built-in functions. Math.round, et c.

See also  bug 14547
Comment 1 Garrett Smith 2007-10-13 22:55:03 PDT
ECMA 262 3rd Ed, Section 15 paragraph 9 says:-

"None of the built-in functions described in this section shall implement the
internal [[Construct]] method unless otherwise specified in the description of
a particular function. None of the built-in functions described in this section
shall initially have a prototype property unless otherwise specified in the
description of a particular function."