syntax error for require/typed in untyped code

This commit is contained in:
Alex Knauth 2015-05-09 06:07:20 -04:00 committed by Sam Tobin-Hochstadt
parent 3a70ed5669
commit c6b1f8fdc0

View File

@ -140,6 +140,8 @@
(define ((r/t-maker legacy) stx)
(unless (unbox typed-context?)
(raise-syntax-error #f "only allowed in a typed module" stx))
(syntax-parse stx
[(_ lib:expr (~var c (clause legacy #'lib)) ...)
(when (zero? (syntax-length #'(c ...)))