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

expose rangeBase typetrait, fix enum conversion warning #24056

Merged
merged 3 commits into from
Sep 6, 2024

Conversation

metagn
Copy link
Collaborator

@metagn metagn commented Sep 3, 2024

refs #21682, refs #24038

The rangeBase typetrait added in #21682 which gives the base type of a range type is now added publicly to typetraits. Previously it was only privately used in repr_v2 and in enumutils since #24052 (coincidentally I didn't see this until now). This is part of an effort to make range types easier to work with in generics, as mentioned in #24038. Its use combined with #24037 is also tested.

The condition for the "enum to enum conversion" warning is now also restricted to conversions between different enum base types, i.e. conversion between an enum type and a range type of itself doesn't give a warning. I put this in this PR since the test gave the warning and so works as a regression test.

@Araq Araq merged commit d77ea07 into nim-lang:devel Sep 6, 2024
19 checks passed
Copy link
Contributor

github-actions bot commented Sep 6, 2024

Thanks for your hard work on this PR!
The lines below are statistics of the Nim compiler built from d77ea07

Hint: mm: orc; opt: speed; options: -d:release
174104 lines; 8.716s; 655.223MiB peakmem

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.

2 participants