Fix #:opaque require clauses at the top-level

This commit is contained in:
Asumu Takikawa 2015-10-21 17:22:16 -04:00
parent f1cb23062a
commit 2479dffde0
2 changed files with 10 additions and 4 deletions

View File

@ -334,6 +334,10 @@
(with-syntax ([hidden (generate-temporary #'pred)])
(quasisyntax/loc stx
(begin
;; register the identifier for the top-level (see require/typed)
#,@(if (eq? (syntax-local-context) 'top-level)
(list #'(define-syntaxes (hidden) (values)))
null)
#,(ignore #'(define pred-cnt (any/c . c-> . boolean?)))
#,(internal #'(require/typed-internal hidden (Any -> Boolean : (Opaque pred))))
#,(if (attribute ne)

View File

@ -106,10 +106,12 @@
;; PR 14487
(test-form-not-exn
(require/typed racket/base
[#:opaque Evt evt?]
[alarm-evt (Real -> Evt)]
[sync (Evt -> Any)]))
(begin
(require/typed racket/base
[#:opaque Evt evt?]
[alarm-evt (Real -> Evt)]
[sync (Evt -> Any)])
evt?))
;; PR 14380
(test-form-not-exn (begin - (void)))