summary refs log tree commit diff stats
path: root/compiler/semcall.nim
diff options
context:
space:
mode:
authormetagn <metagngn@gmail.com>2024-09-06 12:18:20 +0300
committerGitHub <noreply@github.com>2024-09-06 11:18:20 +0200
commitd77ea0783786e863804a1c51186d6811187215f7 (patch)
tree804c99d3ef4db0d9b29a6533954ed8d641784b5d /compiler/semcall.nim
parentbf865fa75aba5ed61f123e528044285a87bdd0b1 (diff)
downloadNim-d77ea0783786e863804a1c51186d6811187215f7.tar.gz
expose `rangeBase` typetrait, fix enum conversion warning (#24056)
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.
Diffstat (limited to 'compiler/semcall.nim')
0 files changed, 0 insertions, 0 deletions