fix bug in insertion of guards to prevent use before definition

This commit is contained in:
Matthew Flatt 2014-05-12 08:09:23 -06:00
parent 1d87c95bf0
commit be04593a31
3 changed files with 7 additions and 5 deletions

View File

@ -90,6 +90,10 @@
(err/rt-test (let ([x (lambda () (define d d) d)]) (x)) exn:fail:contract:variable?)
(err/rt-test ((lambda () (define d d) d)) exn:fail:contract:variable?)
(err/rt-test ((lambda () (define d (set! d #f)) d)) exn:fail:contract:variable?)
(err/rt-test (letrec ([y (let ([o x]) (o))]
[x (void)])
y)
exn:fail:contract:variable?)
(test '(3 4 5 6) (lambda x x) 3 4 5 6)
(test '(5 6) (lambda (x y . z) z) 3 4 5 6)
(test 'second (lambda () (cons 'first 2) 'second))

View File

@ -1203,9 +1203,7 @@ static Scheme_Object *letrec_check_lets(Scheme_Object *o, Letrec_Check_Frame *ol
}
}
if (frame_type == FRAME_TYPE_LETREC) {
clv->value = val;
}
clv->value = val;
body = clv->body;
}

View File

@ -13,12 +13,12 @@
consistently.)
*/
#define MZSCHEME_VERSION "6.0.1.8"
#define MZSCHEME_VERSION "6.0.1.9"
#define MZSCHEME_VERSION_X 6
#define MZSCHEME_VERSION_Y 0
#define MZSCHEME_VERSION_Z 1
#define MZSCHEME_VERSION_W 8
#define MZSCHEME_VERSION_W 9
#define MZSCHEME_VERSION_MAJOR ((MZSCHEME_VERSION_X * 100) + MZSCHEME_VERSION_Y)
#define MZSCHEME_VERSION_MINOR ((MZSCHEME_VERSION_Z * 1000) + MZSCHEME_VERSION_W)