From 66da5eef00892fef3f8054b20ccdc1f2f09016b7 Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Fri, 29 Jul 2016 15:51:33 -0700 Subject: [PATCH] Traverse #%expression when looking for annotations. Bug found by @mflatt's change to `syntax-parameterize`. --- typed-racket-lib/typed-racket/typecheck/find-annotation.rkt | 1 + typed-racket-lib/typed-racket/typecheck/tc-lambda-unit.rkt | 1 + 2 files changed, 2 insertions(+) diff --git a/typed-racket-lib/typed-racket/typecheck/find-annotation.rkt b/typed-racket-lib/typed-racket/typecheck/find-annotation.rkt index ecdd370a..f425a0c3 100644 --- a/typed-racket-lib/typed-racket/typecheck/find-annotation.rkt +++ b/typed-racket-lib/typed-racket/typecheck/find-annotation.rkt @@ -27,6 +27,7 @@ #:with (expr ...) #'(cls.e ... body)) (pattern (letrec-values cls:lv-clauses body) #:with (expr ...) #'(cls.e ... body)) + (pattern (#%expression expr ...)) (pattern (#%plain-app expr ...)) (pattern (if expr ...)) (pattern (with-continuation-mark expr ...)) diff --git a/typed-racket-lib/typed-racket/typecheck/tc-lambda-unit.rkt b/typed-racket-lib/typed-racket/typecheck/tc-lambda-unit.rkt index 61c27f84..c8bc7d57 100644 --- a/typed-racket-lib/typed-racket/typecheck/tc-lambda-unit.rkt +++ b/typed-racket-lib/typed-racket/typecheck/tc-lambda-unit.rkt @@ -31,6 +31,7 @@ (define-syntax-class rebuild-let* #:literal-sets (kernel-literals) #:attributes (mapping flag-mapping) + (pattern (#%expression :rebuild-let*)) (pattern (let-values ([(new-id) e:cl-rhs]) body:rebuild-let*) #:attr mapping (dict-set (attribute body.mapping) #'e.i #'new-id) #:attr flag-mapping (if (attribute e.cond)