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: property_attribute operator #1067

Merged
merged 1 commit into from
Sep 13, 2022

Conversation

RaisinTen
Copy link
Contributor

  • property_attribute previously had an addition operator overload which doesn't make much sense in comparison to the corresponding V8 enumeration. This changes that to a bitor overload.

  • There was an edge case where READ_ONLY (1) + READ_ONLY (1) + DONT_ENUM (2) would evaluate to DONT_DELETE (4) instead of READ_ONLY + DONT_ENUM because of addition. This change also fixes that and adds a test for that case.

Signed-off-by: Darshan Sen [email protected]

cc @bnoordhuis since this was added in #228

* property_attribute previously had an addition operator overload which
  doesn't make much sense in comparison to the corresponding V8
  enumeration. This changes that to a bitor overload.

* There was an edge case where
  READ_ONLY (1) + READ_ONLY (1) + DONT_ENUM (2) would evaluate to
  DONT_DELETE (4) instead of READ_ONLY + DONT_ENUM because of addition.
  This change also fixes that and adds a test for that case.

Signed-off-by: Darshan Sen <[email protected]>
@ry ry merged commit 780eb79 into denoland:main Sep 13, 2022
@RaisinTen RaisinTen deleted the fix/property_attribute-operator branch September 13, 2022 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants