Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c65c6c0

Browse files
authoredMay 5, 2025··
Add support for the bitwise NOT(~) unary operator (#7418)
1 parent 80c96a1 commit c65c6c0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+178
-78
lines changed
 

‎CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
- Add shift (`<<`, `>>`, `>>>`) operators for `int` and `bigint`. https://github.com/rescript-lang/rescript/pull/7183
2323
- Add bitwise AND (`&`) operator for `int` and `bigint`. https://github.com/rescript-lang/rescript/pull/7415
24+
- Add bitwise NOT (`~`) operator for `int` and `bigint`. https://github.com/rescript-lang/rescript/pull/7418
2425
- Significantly reduced the download size by splitting binaries into optional platform-specific dependencies (e.g, `@rescript/linux-x64`). https://github.com/rescript-lang/rescript/pull/7395
2526
- JSX: do not error on ref as prop anymore (which is allowed in React 19). https://github.com/rescript-lang/rescript/pull/7420
2627

‎compiler/core/j.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ and expression_desc =
8888
| Typeof of expression
8989
| In of expression * expression (* prop in obj *)
9090
| Js_not of expression (* !v *)
91+
| Js_bnot of expression (* ~v *)
9192
(* TODO: Add some primitives so that [js inliner] can do a better job *)
9293
| Seq of expression * expression
9394
| Cond of expression * expression * expression

0 commit comments

Comments
 (0)
Please sign in to comment.