From 89ffbb1c2e8d06ec35b8c994e65b9bb7ad29e52a Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Thu, 12 Sep 2013 18:04:08 -0400 Subject: [PATCH] Improve error reporting of procedures defined by define-inlinable. * module/ice-9/boot-9.scm (define-inlinable): Improve error reporting when procedures defined using 'define-inlinable' are applied to the wrong number of arguments. * module/srfi/srfi-9.scm (define-tagged-inlinable): Improve error reporting when procedures defined using 'define-tagged-inlinable' are applied to the wrong number of arguments. --- module/ice-9/boot-9.scm | 2 ++ module/srfi/srfi-9.scm | 2 ++ 2 files changed, 4 insertions(+) diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm index 3cd3bdc12..19c22eabb 100644 --- a/module/ice-9/boot-9.scm +++ b/module/ice-9/boot-9.scm @@ -4161,6 +4161,8 @@ when none is available, reading FILE-NAME with READER." (lambda (formals ...) body ...)) args ...)) + ((_ a (... ...)) + (syntax-violation 'name "Wrong number of arguments" x)) (_ (identifier? x) #'proc-name)))))))))) diff --git a/module/srfi/srfi-9.scm b/module/srfi/srfi-9.scm index d213a8656..2fc892865 100644 --- a/module/srfi/srfi-9.scm +++ b/module/srfi/srfi-9.scm @@ -122,6 +122,8 @@ #'((lambda (formals ...) body ...) args ...)) + ((_ a (... ...)) + (syntax-violation 'name "Wrong number of arguments" x)) (_ (identifier? x) #'proc-name))))))))))