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

Normative: throw on negative set sizes #88

Merged
merged 2 commits into from
Jul 18, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions spec/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ <h1>
1. NOTE: If _rawSize_ is *undefined*, then _numSize_ will be *NaN*.
1. If _numSize_ is *NaN*, throw a *TypeError* exception.
1. Let _intSize_ be ! ToIntegerOrInfinity(_numSize_).
1. If _intSize_ < 0, set _intSize_ to 0.
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe to use ToLength?

ljharb marked this conversation as resolved.
Show resolved Hide resolved
1. Let _has_ be ? Get(_obj_, *"has"*).
1. If IsCallable(_has_) is *false*, throw a *TypeError* exception.
1. Let _keys_ be ? Get(_obj_, *"keys"*).
Expand Down