Validate the number of arguments passed to local function calls

This commit is contained in:
Justin Ethier 2019-11-07 13:37:20 -05:00
parent caf1dc23ef
commit debbde6849
2 changed files with 5 additions and 4 deletions

View file

@ -5,7 +5,7 @@
Features
- Faster record type constructors
TODO: is arg # validation sufficient??
- During compilation, validate the number of arguments passed to local function calls.
## 0.11.5 - October 30, 2019

View file

@ -2409,9 +2409,10 @@
;; Extract lambda definition
(var (adb:get/default (car ast) #f))
(lam* (adbv:assigned-value var))
((pair? lam*))
;; Assigned value is boxed in a cell, extract it
(lam (car lam*))
;; If assigned value is boxed in a cell, extract it
(lam (if (pair? lam*)
(car lam*)
lam*))
((ast:lambda? lam))
(formals-type (ast:lambda-formals-type lam))
((equal? 'args:fixed formals-type)) ;; Could validate fixed-with-varargs, too