Commit cea052e
committed
fix: correct class name in Long{AboveMax,BelowMin} type-change error
LongAboveMax.to() and LongBelowMin.to() raised a TypeError whose message
named IntAboveMax/IntBelowMin, a copy-paste leftover from the Int singletons
above them. When a long overflow literal is asked to convert to an unsupported
type, the diagnostic misidentified it as an int literal, which is misleading
when debugging.
Point each message at its own class and add regression tests covering both the
successful conversion and the corrected error message for the long singletons.
Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com>1 parent 2c75523 commit cea052e
2 files changed
Lines changed: 16 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
254 | | - | |
| 254 | + | |
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
267 | | - | |
| 267 | + | |
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
633 | 633 | | |
634 | 634 | | |
635 | 635 | | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
636 | 650 | | |
637 | 651 | | |
638 | 652 | | |
| |||
0 commit comments