[Top][All Lists]

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

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.2-39-g335c8a

From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.2-39-g335c8a8
Date: Thu, 04 Aug 2011 17:24:31 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

The branch, stable-2.0 has been updated
       via  335c8a89a2e1dfb362b7a52010da4a81ab9cffc9 (commit)
      from  2b582a285af7c30dbe7a3ee167728277a745f9b7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 335c8a89a2e1dfb362b7a52010da4a81ab9cffc9
Author: Andy Wingo <address@hidden>
Date:   Thu Aug 4 19:23:49 2011 +0200

    fix tree-il->scheme test
    * module/language/tree-il.scm (tree-il->scheme): Fix incorporation of
      `lambda' in a `case-lambda'.
    * test-suite/tests/tree-il.test ("tree-il->scheme"): Add a test.


Summary of changes:
 module/language/tree-il.scm   |    2 +-
 test-suite/tests/tree-il.test |   17 +++++++++++++++++
 2 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/module/language/tree-il.scm b/module/language/tree-il.scm
index 221cf26..decd363 100644
--- a/module/language/tree-il.scm
+++ b/module/language/tree-il.scm
@@ -383,7 +383,7 @@
          (case (car alt-expansion)
             `(case-lambda (,formals ,(tree-il->scheme body))
-                          ,@(cdr alt-expansion)))
+                          ,(cdr alt-expansion)))
             `(case-lambda* (,formals ,(tree-il->scheme body))
                            ,(cdr alt-expansion)))
diff --git a/test-suite/tests/tree-il.test b/test-suite/tests/tree-il.test
index 2dce471..cb609aa 100644
--- a/test-suite/tests/tree-il.test
+++ b/test-suite/tests/tree-il.test
@@ -55,6 +55,23 @@
              (pat (guard test ...) #t)
              (else #f))))))))
+(define-syntax pass-if-tree-il->scheme
+  (syntax-rules ()
+    ((_ in pat)
+     (assert-scheme->tree-il->scheme in pat #t))
+    ((_ in pat guard-exp)
+     (pass-if 'in
+       (pmatch (tree-il->scheme
+                (compile 'in #:from 'scheme #:to 'tree-il))
+         (pat (guard guard-exp) #t)
+         (_ #f))))))
+(with-test-prefix "tree-il->scheme"
+  (pass-if-tree-il->scheme
+   (case-lambda ((a) a) ((b c) (list b c)))
+   (case-lambda ((,a) ,a1) ((,b ,c) (list ,b1 ,c1)))
+   (and (eq? a a1) (eq? b b1) (eq? c c1))))
 (with-test-prefix "void"

GNU Guile

reply via email to

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