Cause compiler error when (if ...) has spurious args
This commit is contained in:
parent
aca621c32e
commit
50063d4523
|
@ -262,9 +262,12 @@
|
|||
(endl (make-label g))
|
||||
(test (cadr x))
|
||||
(then (caddr x))
|
||||
(else (if (pair? (cdddr x))
|
||||
(cadddr x)
|
||||
(void))))
|
||||
(else (cond ((null? (cdddr x))
|
||||
(void))
|
||||
((null? (cddddr x))
|
||||
(cadddr x))
|
||||
(else
|
||||
(error "compile error: if expects 2-3 arguments.")))))
|
||||
(cond ((eq? test #t)
|
||||
(compile-in g env tail? then))
|
||||
((eq? test #f)
|
||||
|
|
Loading…
Reference in New Issue