From 7662a0918de1e741b6a963e87bb5b96bd85b8995 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 23 Jul 2016 15:29:14 +0200 Subject: [PATCH] bugs/top.mes: document toplevel begin bug; probable reason for record/syntax-case failure. --- bugs/top.mes | 12 ++++++++++++ test.mes | 6 ++++++ 2 files changed, 18 insertions(+) create mode 100644 bugs/top.mes diff --git a/bugs/top.mes b/bugs/top.mes new file mode 100644 index 00000000..52ef5598 --- /dev/null +++ b/bugs/top.mes @@ -0,0 +1,12 @@ +(begin (define *test-begin-a* '*test-begin-a*)) + +(display "defined? *test-begin-a*: ") +(display (defined? '*test-begin-a*)) +(newline) +(display *test-begin-a*) +(newline) + +(let () (define *test-let-a* '*test-let-a*) #f) +(display "defined? *test-let-a*: ") +(display (defined? '*test-let-a*)) +(newline) diff --git a/test.mes b/test.mes index 7bedfe7e..e3ca833d 100644 --- a/test.mes +++ b/test.mes @@ -236,6 +236,12 @@ (pass-if "cond-expand" (sequal? (cond-expand (foobar #f) (mes (display ": pass: *YAY*") 'mes) (guile (display ": pass: *GUILE*") 'mes)) 'mes)) +(begin (define *top-begin-a* '*top-begin-a*)) +(pass-if "top begin " (seq? (and (defined? '*top-begin-a*) *top-begin-a*) '*top-begin-a*)) + +(let () (define *top-let-a* '*top-let-a*) #f) +(pass-if "top let " (seq? (and (defined? '*top-let-a*) *top-let-a*) #f)) + (newline) (display "passed: ") (display (car (result))) (newline) (display "failed: ") (display (cadr (result))) (newline)