Avoid error when `orig-module-stx' not set.

svn: r16399

original commit: dc5d10409cff2f12e074a45f88e0d9e59958d2b8
This commit is contained in:
Sam Tobin-Hochstadt 2009-10-21 14:47:07 +00:00
parent 34f394533b
commit 32fb4f441d

View File

@ -42,7 +42,7 @@ don't depend on any other portion of the system
(let ([l (current-logger)])
(when (and (warn-unreachable?)
(log-level? l 'warning)
(eq? (syntax-source-module e) (syntax-source-module (orig-module-stx)))
(and (orig-module-stx) (eq? (syntax-source-module e) (syntax-source-module (orig-module-stx))))
(syntax-source-module e))
(log-message l 'warning (format "Typed Scheme has detected unreachable code: ~e" (syntax->datum (locate-stx e)))
e))))