refuse _ in a function's signature
Nothing solves it there, and it reached the C as _.
This commit is contained in:
@@ -283,6 +283,14 @@
|
||||
;; be answered from the scope it was written in
|
||||
(expanded (append (macro-expand (take sex-fn boundary))
|
||||
(drop sex-fn boundary))))
|
||||
;; a `_' is solved from what a variable is set to, and a signature
|
||||
;; has nothing it is set to
|
||||
(when (mentions? (cons (sex-fn-return-type expanded)
|
||||
(arglist-types (sex-fn-arglist expanded)))
|
||||
'_)
|
||||
(sex-error sex-fn-raw
|
||||
"a function's types are written out; `_' is a variable's"
|
||||
(sex-fn-name expanded)))
|
||||
(add-name-type! (sex-fn-name expanded) (fn-type-of expanded))
|
||||
(let* ((env (make-fn-env expanded))
|
||||
;; the parameters are the body's outermost scope
|
||||
|
||||
Reference in New Issue
Block a user