Update require/typed in no-check mode for keywords
Closes PR 14463 original commit: 2a32c588157263489c4928fa90c50409dbb3b87b
This commit is contained in:
parent
23b147607f
commit
36a34fd3ea
|
@ -25,11 +25,16 @@
|
|||
(define-syntax-class struct-clause
|
||||
;#:literals (struct)
|
||||
#:attributes (nm (body 1))
|
||||
(pattern [#:struct nm:opt-rename (body ...)])
|
||||
(pattern [struct nm:opt-rename (body ...)]
|
||||
#:fail-unless (eq? 'struct (syntax-e #'struct)) #f))
|
||||
(define-syntax-class opaque-clause
|
||||
;#:literals (opaque)
|
||||
#:attributes (ty pred opt)
|
||||
(pattern [#:opaque ty:id pred:id]
|
||||
#:with opt #'())
|
||||
(pattern [#:opaque ty:id pred:id #:name-exists]
|
||||
#:with opt #'(#:name-exists))
|
||||
(pattern [opaque ty:id pred:id]
|
||||
#:fail-unless (eq? 'opaque (syntax-e #'opaque)) #f
|
||||
#:with opt #'())
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
#lang typed/racket/no-check
|
||||
|
||||
;; Test for PR 14463. Check that require/typed with #:opaque works
|
||||
;; in no-check mode
|
||||
|
||||
(module untyped racket
|
||||
(provide f thing?)
|
||||
(define (f x) x)
|
||||
(define (thing? x) #t))
|
||||
|
||||
(require/typed 'untyped
|
||||
[#:opaque Thing thing?]
|
||||
[f (Thing -> Thing)])
|
||||
|
||||
(thing? 3)
|
Loading…
Reference in New Issue
Block a user