diff --git a/collects/typed-scheme/private/tc-utils.ss b/collects/typed-scheme/private/tc-utils.ss index a104bf8016..95383feb2d 100644 --- a/collects/typed-scheme/private/tc-utils.ss +++ b/collects/typed-scheme/private/tc-utils.ss @@ -29,7 +29,9 @@ ;(printf "orig: ~a~n" (syntax-object->datum omodule)) ;(printf "exp: ~a~n" (syntax-object->datum emodule)) ;(printf "stx (locate): ~a~n" (syntax-object->datum stx)) - (look-for-in-orig omodule emodule stx)) + (if (and omodule emodule stx) + (look-for-in-orig omodule emodule stx) + stx)) ;; produce a type error, using the current syntax (define (tc-error msg . rest)