mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 01:00:20 +02:00
Add `arity-mismatch' warning type.
* module/language/tree-il/analyze.scm (<arity-info>): New record type. (validate-arity, arity-analysis): New variables. * module/language/tree-il/compile-glil.scm (%warning-passes): Add `arity-mismatch'. * module/system/base/message.scm (%warning-types): Likewise. * test-suite/tests/tree-il.test (read-and-compile): Remove, as it's now public. (%opts-w-arity): New. ("warnings")["arity mismatch"]: New test prefix.
This commit is contained in:
parent
48b1db7543
commit
ae03cf1f59
4 changed files with 354 additions and 10 deletions
|
@ -85,7 +85,18 @@
|
|||
"report possibly unbound variables"
|
||||
,(lambda (port loc name)
|
||||
(format port "~A: warning: possibly unbound variable `~A'~%"
|
||||
loc name))))))
|
||||
loc name)))
|
||||
|
||||
(arity-mismatch
|
||||
"report procedure arity mismatches (wrong number of arguments)"
|
||||
,(lambda (port loc name certain?)
|
||||
(if certain?
|
||||
(format port
|
||||
"~A: warning: wrong number of arguments to `~A'~%"
|
||||
loc name)
|
||||
(format port
|
||||
"~A: warning: possibly wrong number of arguments to `~A'~%"
|
||||
loc name)))))))
|
||||
|
||||
(define (lookup-warning-type name)
|
||||
"Return the warning type NAME or `#f' if not found."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue