Skip to content
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

Detect division by zero when inlining #648

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jpellegrini
Copy link
Contributor

These two situations are similar, but one signals a compiler error, and the other signals an error after copilation:

stklos> (/)
**** Error:
compiler-error: /: needs at least one argument
	(type ",help" for more information)
stklos> (/ 2 0)
**** Error:
/: cannot make rational with null denominator
	(type ",help" for more information)

With this PR, both are treated similarly.

These two situations are similar, but one signals a compiler error,
and the other signals an error after copilation:

```scheme
stklos> (/)
**** Error:
compiler-error: /: needs at least one argument
	(type ",help" for more information)
stklos> (/ 2 0)
**** Error:
/: cannot make rational with null denominator
	(type ",help" for more information)
```

With this PR, both are treated similarly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant