~ chicken-core (chicken-5) 1b7b630d37ead147b2ed89e0a69a484a542bf0a5


commit 1b7b630d37ead147b2ed89e0a69a484a542bf0a5
Author:     felix <felix@call-with-current-continuation.org>
AuthorDate: Fri Jul 6 08:45:47 2012 +0200
Commit:     Christian Kellermann <ckeen@pestilenz.org>
CommitDate: Fri Jul 6 09:16:54 2012 +0200

    type-declaration macros in code evaluated at runtime must not assume they are executed in a compilation context (contributed by megane)
    
    Signed-off-by: felix <felix@call-with-current-continuation.org>
    Signed-off-by: Christian Kellermann <ckeen@pestilenz.org>

diff --git a/chicken-syntax.scm b/chicken-syntax.scm
index e9d27551..4c1161b8 100644
--- a/chicken-syntax.scm
+++ b/chicken-syntax.scm
@@ -1165,7 +1165,7 @@
  (##sys#er-transformer
   (lambda (x r c)
     (##sys#check-syntax ': x '(_ symbol _ . _))
-    (if (memq #:csi ##sys#features) 
+    (if (not (memq #:compiling ##sys#features)) 
 	'(##core#undefined)
 	(let* ((type1 (##sys#strip-syntax (caddr x)))
 	       (name1 (cadr x)))
@@ -1196,7 +1196,7 @@
  'define-specialization '()
  (##sys#er-transformer
   (lambda (x r c)
-    (cond ((memq #:csi ##sys#features) '(##core#undefined))
+    (cond ((not (memq #:compiling ##sys#features)) '(##core#undefined))
 	  (else
 	   (##sys#check-syntax 'define-specialization x '(_ (variable . #(_ 0)) _ . #(_ 0 1)))
 	   (let* ((head (cadr x))
@@ -1287,7 +1287,7 @@
  (##sys#er-transformer
   (lambda (x r c)
     (##sys#check-syntax 'define-type x '(_ variable _))
-    (cond ((memq #:csi ##sys#features) '(##core#undefined))
+    (cond ((not (memq #:compiling ##sys#features)) '(##core#undefined))
 	  (else
 	   (let ((name (##sys#strip-syntax (cadr x)))
 		 (%quote (r 'quote))
Trap