Replace errNegativeNotAllowed with overflow error
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 4k
- Forks
- 337
- Avg merge
- 15m
- Merged PRs (30d)
- 1
Description
Technically, the following is valid:
var i int64 = -1
j := uint64(i)
The value will overflow, but the conversion happens.
We should replace the errNegativeNotAllowed error with one that signals that the conversion was successful, but an overflow occurred.
Combining this idea with #86, it might even make sense to have a single base error.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating errNegativeNotAllowed and read issue #86 to understand the proposed shared error design. The work is done when negative-to-unsigned conversion reports overflow rather than rejection, with the relationship to the issue #86 error design resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100