Skip to content
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.

Generate compile-time error on div/mod with constant denominator zero #27

Open
edfelten opened this issue May 28, 2020 · 0 comments
Open
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@edfelten
Copy link
Contributor

edfelten commented May 28, 2020

Currently, if a program divides or mods by a constant zero, the compiler will generate code that leads to a runtime panic. This should be detected at compile time and reported as an error.

(Note that the compiler already does compile-time constant folding, so this should be easy to check for.)

@edfelten edfelten added the enhancement New feature or request label May 28, 2020
@rachel-bousfield rachel-bousfield added the good first issue Good for newcomers label Dec 13, 2021
rachel-bousfield added a commit that referenced this issue May 27, 2022
Fix blockhash(block.number) returns 0 upon new L1 block
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants