chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Fix potential invalid argument error in `##sys#decompose-import'


From: Evan Hanson
Subject: [PATCH] Fix potential invalid argument error in `##sys#decompose-import'
Date: Sun, 3 May 2020 09:25:48 +1200

This fixes a small bug in `##sys#decompose-import' where "spec" (which
is a list) is passed to the `warn' procedure rather than "name" (which
is a symbol, as expected). This leads to an invalid argument error
arising from `symbol->string', e.g.

  $ echo '(import (only (rename scheme (car first)) car))' | csc -

  Error: (symbol->string) during expansion of (import ...) - bad
    argument type - not a symbol: (rename scheme (car first))
---
 modules.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git modules.scm modules.scm
index a199f9e7..beb52eaf 100644
--- modules.scm
+++ modules.scm
@@ -638,7 +638,7 @@
                             (cond ((null? ids)
                                    (for-each
                                     (lambda (id)
-                                      (warn "imported identifier doesn't 
exist" spec id))
+                                      (warn "imported identifier doesn't 
exist" name id))
                                     missing)
                                    (values name lib `(,head ,spec ,@imports) v 
s impi))
                                   ((assq (car ids) impv) =>
-- 
2.25.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]