Fix sf/cgen so it doesn't just drop declarations for the compiler.
authorTaylor R Campbell <campbell@mumble.net>
Sat, 15 Mar 2014 20:30:09 +0000 (20:30 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Sat, 15 Mar 2014 20:30:12 +0000 (20:30 +0000)
src/sf/cgen.scm

index e0b8506c23cf5e82ffe4c9456edca2279194474a..15b0a664b16cc7255bfd4fdecbb8aa7a455736dd 100644 (file)
@@ -184,8 +184,10 @@ USA.
                        (body  (procedure/body procedure)))
                    (if (open-block? body)
                        (cgen-open-block body)
-                       (cgen/expression (list block)
-                                        (procedure/body procedure)))))))
+                       (make-open-block
+                        '()
+                        (maybe-flush-declarations (block/declarations block))
+                        (cgen/expression (list block) body)))))))
 
 (define (cgen-open-block expression)
   (let ((block (open-block/block expression)))