-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
enable --warning:ImplicitRangeConversion
#25477
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
base: devel
Are you sure you want to change the base?
Conversation
| # Check if the ranges don't perfectly overlap | ||
| result = not isRangeSupertype(conf, f, a) | ||
| if a.kind == tyInt and f.sym != nil and (f.sym.name.s == "Positive" or | ||
| f.sym.name.s == "Natural"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you use this string-based approach, check that the owner has the sfSystemModule flag!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm, in this case we need a separate warning for these, Natural in particular is easy to mess up because people don't realize it's affected by range issues and they try to use it unfortunately. It has crossed my mind that natural should simply be redefined as an int which would remove all these warnings.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.