New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integer division by 0 should error #565

Closed
jvoigtlaender opened this Issue Apr 19, 2016 · 1 comment

Comments

Projects
None yet
1 participant
@jvoigtlaender
Contributor

jvoigtlaender commented Apr 19, 2016

Currently this:

import Graphics.Element

main = Graphics.Element.show (1 // 0)

prints zero, whereas this:

import Graphics.Element

main = Graphics.Element.show (1 % 0)

raises a runtime error.

Raising a runtime error on 1 % 0 was a conscious decision, see elm/compiler#262 (comment), and it seems that 1 // 0 should behave accordingly.

@jvoigtlaender

This comment has been minimized.

Show comment
Hide comment
@jvoigtlaender

jvoigtlaender May 10, 2016

Contributor

Closing this for the more comprehensive #590.

Contributor

jvoigtlaender commented May 10, 2016

Closing this for the more comprehensive #590.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment