egallesio / STklos

STklos Scheme
http://stklos.net
GNU General Public License v2.0
67 stars 17 forks source link

Detect division by zero when inlining #648

Open jpellegrini opened 1 month ago

jpellegrini commented 1 month ago

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.