Fix typecheck-fail
in TR
Closes PR 14449
This commit is contained in:
parent
34abe306e3
commit
9e7b013a7d
|
@ -113,9 +113,14 @@
|
|||
[predicate-assertion
|
||||
(assert-predicate-internal type predicate)]
|
||||
[type-declaration
|
||||
(:-internal id:identifier type)]
|
||||
[typecheck-failure
|
||||
(typecheck-fail-internal stx message:str var:id)])
|
||||
(:-internal id:identifier type)])
|
||||
|
||||
;; Define separately outside of `define-internal-classes` since this form
|
||||
;; is meant to appear in expression positions, so it doesn't make sense to use
|
||||
;; the `define-values` protocol used for other internal forms.
|
||||
(define-syntax-class typecheck-failure
|
||||
#:literal-sets (kernel-literals internal-literals)
|
||||
(pattern (quote-syntax (typecheck-fail-internal stx message:str var))))
|
||||
|
||||
;;; Internal form creation
|
||||
(begin-for-syntax
|
||||
|
|
|
@ -2747,6 +2747,12 @@
|
|||
(f 1 2 3))
|
||||
#:ret (ret Univ -true-filter)]
|
||||
|
||||
;; typecheck-fail should fail
|
||||
[tc-err (typecheck-fail #'stx "typecheck-fail")
|
||||
#:msg #rx"typecheck-fail"]
|
||||
[tc-err (string-append (typecheck-fail #'stx "typecheck-fail") "bar")
|
||||
#:ret (ret -String)
|
||||
#:msg #rx"typecheck-fail"]
|
||||
)
|
||||
(test-suite
|
||||
"tc-literal tests"
|
||||
|
|
Loading…
Reference in New Issue
Block a user