From 38d984367ec6ce2fea6757183b84e67c0d2af9d6 Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Fri, 30 Sep 2011 15:03:49 -0600 Subject: [PATCH] syntax/parse: fix check-literals code (references to disappearing names) --- collects/syntax/parse/private/runtime.rkt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/collects/syntax/parse/private/runtime.rkt b/collects/syntax/parse/private/runtime.rkt index 1ebae79809..602c05d261 100644 --- a/collects/syntax/parse/private/runtime.rkt +++ b/collects/syntax/parse/private/runtime.rkt @@ -5,6 +5,7 @@ (for-syntax racket/base racket/list syntax/kerncase + syntax/strip-context racket/private/sc racket/syntax "rep-attrs.rkt" @@ -161,11 +162,14 @@ residual.rkt. ;; so we can avoid run-time call to identifier-binding if ;; (+ (phase-of-enclosing-module) ok-phase/ct-rel) = used-phase (with-syntax ([ok-phases/ct-rel ok-phases/ct-rel]) - #'(check-literal* (quote-syntax id) + #`(check-literal* (quote-syntax id) used-phase-expr (phase-of-enclosing-module) 'ok-phases/ct-rel - (quote-syntax ctx))))])) + ;; If context is not stripped, racket complains about + ;; being unable to restore bindings for compiled code; + ;; and all we want is the srcloc, etc. + (quote-syntax #,(strip-context #'ctx)))))])) ;; ====