diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed/private/no-check-helper.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed/private/no-check-helper.rkt index 0f94e540..cb38489d 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed/private/no-check-helper.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed/private/no-check-helper.rkt @@ -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 #'()) diff --git a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/succeed/pr14463.rkt b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/succeed/pr14463.rkt new file mode 100644 index 00000000..6bd32576 --- /dev/null +++ b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/succeed/pr14463.rkt @@ -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)