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

Add more int type aliases #8062

Closed
AndrolGenhald opened this issue Jun 6, 2022 · 2 comments
Closed

Add more int type aliases #8062

AndrolGenhald opened this issue Jun 6, 2022 · 2 comments
Labels
easy problems Issues that can be fixed without background knowledge of Psalm enhancement good first issue Help wanted

Comments

@AndrolGenhald
Copy link
Collaborator

AndrolGenhald commented Jun 6, 2022

Oh, I thought I already added negative-int but I guess not. It should be easy to do if someone wants to add that

Originally posted by @orklah in #8060 (comment)

Should be trivial to add in Atomic::create (see how positive-int is handled there).

We'll probably want

  • non-negative-int
  • negative-int
  • non-positive-int

just for completeness sake.

@AndrolGenhald AndrolGenhald added enhancement easy problems Issues that can be fixed without background knowledge of Psalm Help wanted good first issue labels Jun 6, 2022
@orklah
Copy link
Collaborator

orklah commented Jun 6, 2022

Note to my future self: I need to think of pinging Ondrej on that if new keywords are implemented

@weirdan
Copy link
Collaborator

weirdan commented Nov 24, 2022

I don't think we need those now that we have integer ranges:

  • non-negative-int = int<0, max>
  • negative-int = int<min,-1>
  • non-positive-int = int<min, 0>

@weirdan weirdan closed this as completed Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy problems Issues that can be fixed without background knowledge of Psalm enhancement good first issue Help wanted
Projects
None yet
Development

No branches or pull requests

3 participants