diff options
author | metagn <metagngn@gmail.com> | 2024-09-06 12:18:20 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-06 11:18:20 +0200 |
commit | d77ea0783786e863804a1c51186d6811187215f7 (patch) | |
tree | 804c99d3ef4db0d9b29a6533954ed8d641784b5d /changelog.md | |
parent | bf865fa75aba5ed61f123e528044285a87bdd0b1 (diff) | |
download | Nim-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 'changelog.md')
-rw-r--r-- | changelog.md | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/changelog.md b/changelog.md index 6c06e2913..305409fa5 100644 --- a/changelog.md +++ b/changelog.md @@ -55,6 +55,8 @@ - Added `setLenUninit` to system, which doesn't initialize slots when enlarging a sequence. - Added `hasDefaultValue` to `std/typetraits` to check if a type has a valid default value. +- Added `rangeBase` to `std/typetraits` to obtain the base type of a range type or + convert a value with a range type to its base type. - Added Viewport API for the JavaScript targets in the `dom` module. - Added `toSinglyLinkedRing` and `toDoublyLinkedRing` to `std/lists` to convert from `openArray`s. - ORC: To be enabled via `nimOrcStats` there is a new API called `GC_orcStats` that can be used to query how many |