-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Editorial: Narrow integer
into non-negative integer
in return type of ExpectedArgumentCount
#3378
Editorial: Narrow integer
into non-negative integer
in return type of ExpectedArgumentCount
#3378
Conversation
non-negative integer
or +infin
instead of integer in return type of ExpectedArgumentCountnon-negative integer
instead of integer in return type of ExpectedArgumentCount
7a1a5dc
to
1ff79be
Compare
non-negative integer
instead of integer in return type of ExpectedArgumentCountinteger
into non-negative integer
in return type of ExpectedArgumentCount
The following is the additional reason why I think it is possible to narrow. First, the following cases are all the cases where
In addition, the following is the reason why the type mismatching occurs In the step 21 of |
Looks correct to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Thank you very much for your review! |
…e of ExpectedArgumentCount (tc39#3378)
1ff79be
to
d9d77ad
Compare
I carefully assume that the return type of
ExpectedArgumentCount
can be narrowed intonon-negative integer
, which isinteger
in current specification.The reason why I suggest this PR is that the return type of the ExpectedArgumentCount is integer makes type mismatching in
OrdinaryFunctionCreate
andSetFunctionLength
.