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

extraneous "!" in the text? #13

Open
Li-YangZhong opened this issue May 23, 2020 · 5 comments
Open

extraneous "!" in the text? #13

Li-YangZhong opened this issue May 23, 2020 · 5 comments
Labels
good first issue Good for newcomers

Comments

@Li-YangZhong
Copy link

Li-YangZhong commented May 23, 2020

The "!" is shown in the section below:


`When Boolean is called with argument value, the following steps are taken:

Let b be ! ToBoolean(value).

If NewTarget is undefined, return b.

Let O be ? OrdinaryCreateFromConstructor(NewTarget, "%BooleanPrototype%", « [[BooleanData]] »).

Set O.[[BooleanData]] to b.

Return O.`


However, the following section seems to indicate that there is not a "!" in the section above and the ECMA-262(2019 edition) don't have a "!" in there either. I think the "!" should be removed.


Step 1 casts value (the function argument) to a Boolean value. Interestingly there isn’t a ? or ! shorthand for this step, but usually not having a Completion Record shorthand means the same thing as !. So step 1 cannot throw an exception.


@ExE-Boss
Copy link

@TimothyGu
Copy link
Owner

Indeed. There has been recently a few clean-ups on the usage of these shorthands in the spec. See tc39/ecma262#1622 and https://github.com/tc39/ecma262/pulls?q=label%3A%22completion+records%22.

@TimothyGu
Copy link
Owner

That's a long winded way of saying: I'd appreciate a pull request :)

@TimothyGu TimothyGu added the good first issue Good for newcomers label May 24, 2020
@uaparicio
Copy link

I'm a beginner contributor and I was looking for easy issues to fix when I found this one. I can take care of the ! removal (In spite I don't know what are you talking about there)

@uaparicio
Copy link

#14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants