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 some Object static methods returning wrong value #1318

Merged
merged 2 commits into from Oct 16, 2022

Conversation

KurtGokhan
Copy link
Contributor

As seen in specs, these methods should return a boolean. Somehow this is not covered by test262.

Also added test for #206 so it can be closed.

@@ -496,7 +496,7 @@ private static JsValue IsSealed(JsValue thisObject, JsValue[] arguments)
{
if (arguments.At(0) is not ObjectInstance o)
{
return arguments.At(0);
return true;
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: could return JsBoolen.True and JsBoolean.False

Copy link
Collaborator

@lahma lahma left a comment

Choose a reason for hiding this comment

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

Checked the spec and indeed, boolean is the correct end result for these. Thanks!

@lahma lahma merged commit 7a1902f into sebastienros:main Oct 16, 2022
@lahma
Copy link
Collaborator

lahma commented Oct 16, 2022

I think that was your 3rd hactoberfest-accepted label in this repo (for this season)! 🥳

@KurtGokhan KurtGokhan deleted the object-statics-fix branch October 16, 2022 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants