Make TR's ignore-some property work even if there isn't an internal form.
original commit: bb67e37c4906334dbf43e650643d9162d195fa3d
This commit is contained in:
parent
7654984ca6
commit
ce51776f1f
|
@ -100,7 +100,7 @@
|
|||
expected)
|
||||
|
||||
;; typecheck the expansion of a with-handlers form
|
||||
;; syntax -> any
|
||||
;; syntax -> void
|
||||
(define (check-subforms/ignore form)
|
||||
(let loop ([form form])
|
||||
(kernel-syntax-case* form #f ()
|
||||
|
@ -108,7 +108,7 @@
|
|||
;; if this needs to be checked
|
||||
(syntax-property form 'typechecker:with-type)
|
||||
;; the form should be already ascribed the relevant type
|
||||
(tc-expr form)]
|
||||
(void (tc-expr form))]
|
||||
[(a . b)
|
||||
(loop #'a)
|
||||
(loop #'b)]
|
||||
|
|
|
@ -286,10 +286,9 @@
|
|||
(check-subforms/with-handlers/check form expected)]
|
||||
[stx
|
||||
#:when (syntax-property form 'typechecker:ignore-some)
|
||||
(let ([ty (check-subforms/ignore form)])
|
||||
(unless ty
|
||||
(int-err "internal error: ignore-some"))
|
||||
(check-below ty expected))]
|
||||
(check-subforms/ignore form)
|
||||
;; We trust ignore to be only on syntax objects objects that are well typed
|
||||
expected]
|
||||
;; explicit failure
|
||||
[(quote-syntax ((~literal typecheck-fail-internal) stx msg:str var))
|
||||
(explicit-fail #'stx #'msg #'var)]
|
||||
|
@ -397,10 +396,8 @@
|
|||
ty)]
|
||||
[stx
|
||||
#:when (syntax-property form 'typechecker:ignore-some)
|
||||
(let ([ty (check-subforms/ignore form)])
|
||||
(unless ty
|
||||
(int-err "internal error: ignore-some"))
|
||||
ty)]
|
||||
(check-subforms/ignore form)
|
||||
Univ]
|
||||
;; explicit failure
|
||||
[(quote-syntax ((~literal typecheck-fail-internal) stx msg var))
|
||||
(explicit-fail #'stx #'msg #'var)]
|
||||
|
|
Loading…
Reference in New Issue
Block a user