Message383187
> Some compilers complain about checking `day < 0`, because `day` is an unsigned type
Just my two cents, this isn't just "some compilers". Everything from gcc, msvc, C# to the rust compiler complain about this sort of code. As they should, this is effectively dead code.
I think the more pragmatic way to enforce and document this assumption would be to have a unit test that actually checks that the constructor fails with "negative" days. It'll continue to fail right now as its interpretation as an unsigned int will be large and it will start failing if someone changes this to a signed type. |
|
Date |
User |
Action |
Args |
2020-12-16 16:48:22 | ammar2 | set | recipients:
+ ammar2, serhiy.storchaka, p-ganssle |
2020-12-16 16:48:22 | ammar2 | set | messageid: <1608137302.1.0.510275666551.issue42660@roundup.psfhosted.org> |
2020-12-16 16:48:22 | ammar2 | link | issue42660 messages |
2020-12-16 16:48:22 | ammar2 | create | |
|