Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix [[Class]] property of builtin constructors #325

Closed

Conversation

dbatyai
Copy link
Member

@dbatyai dbatyai commented Jul 7, 2015

Builtin constructor functions should have "Function" as their [[Class]] property.
This fixes ch15/15.4/15.4.3/S15.4.3_A1.1_T2.js
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai [email protected]

@dbatyai dbatyai added bug Undesired behaviour ecma builtins Related to ECMA built-in routines labels Jul 7, 2015
@dbatyai dbatyai added this to the ECMA builtins milestone Jul 7, 2015
assert(Object.toString() === "[object Function]");
assert(Function.toString() === "[object Function]");

assert(Math.toString() === "[object Math]");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we add tests for RegExp and Date?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

@ruben-ayrapetyan
Copy link
Contributor

Looks good to me

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai [email protected]
@dbatyai dbatyai force-pushed the builtin_constructor_class branch from 2d9c444 to 832e9d7 Compare July 7, 2015 14:32
@LaszloLango
Copy link
Contributor

+1 lgtm

@LaszloLango LaszloLango assigned dbatyai and unassigned LaszloLango Jul 7, 2015
@egavrin
Copy link
Contributor

egavrin commented Jul 7, 2015

make push

@dbatyai
Copy link
Member Author

dbatyai commented Jul 7, 2015

merged: 9402e3d

@dbatyai dbatyai closed this Jul 7, 2015
@dbatyai dbatyai deleted the builtin_constructor_class branch July 31, 2015 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Undesired behaviour ecma builtins Related to ECMA built-in routines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants