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

erts: Support is_boolean/1 in match specs #7046

Conversation

jhogberg
Copy link
Contributor

@jhogberg jhogberg commented Mar 23, 2023

This PR adds a few missing guard BIFs like is_boolean/1 to the list of functions allowed in match specifications, and adds a test to ensure that all new guard BIFs are added to this list.

Fixes #7045

@jhogberg jhogberg added team:VM Assigned to OTP team VM enhancement testing currently being tested, tag is used by OTP internal CI labels Mar 23, 2023
@jhogberg jhogberg added this to the OTP-26.0-rc3 milestone Mar 23, 2023
@jhogberg jhogberg self-assigned this Mar 23, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Mar 23, 2023

CT Test Results

       3 files     133 suites   49m 0s ⏱️
1 547 tests 1 496 ✔️ 51 💤 0
1 965 runs  1 895 ✔️ 70 💤 0

Results for commit 1b787560.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@jhogberg jhogberg force-pushed the john/erts/is_boolean-match-specs/GH-7045/OTP-18526 branch from 51e9d89 to c6a25d7 Compare March 23, 2023 08:39
@jhogberg jhogberg requested a review from sverker March 23, 2023 08:45
@sverker
Copy link
Contributor

sverker commented Mar 23, 2023

Can you also add the BIFs to docs at https://www.erlang.org/doc/apps/erts/match_spec.html,
both for tracing and ets grammar.

christhekeele added a commit to christhekeele/matcha that referenced this pull request Mar 23, 2023
…rlang/otp#7046. Still issues with is_record, but that's in our macro expansion land now.
christhekeele added a commit to christhekeele/matcha that referenced this pull request Mar 23, 2023
…rlang/otp#7046. Still issues with is_record, but that's in our macro expansion land now.
@christhekeele
Copy link
Contributor

christhekeele commented Mar 23, 2023

Just finished testing all of these with ets:match_spec_test/3 from a src build and they work great!

@jhogberg jhogberg force-pushed the john/erts/is_boolean-match-specs/GH-7045/OTP-18526 branch from c6a25d7 to 1b78756 Compare March 23, 2023 21:26
@jhogberg
Copy link
Contributor Author

Thanks, I've pushed an update with fixed documentation and extended tests. :-)

@jhogberg jhogberg merged commit c2361dc into erlang:master Mar 31, 2023
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support erlang:is_boolean/1 in match specifications
3 participants