One more "undefined identifier" change in TR
For the top-level undefined/missing annotation case
This commit is contained in:
parent
d62eedaa47
commit
2ed6692428
|
@ -39,7 +39,9 @@
|
||||||
['lexical (tc-error/expr/fields "missing type for identifier"
|
['lexical (tc-error/expr/fields "missing type for identifier"
|
||||||
#:more "consider adding a type annotation with `:'"
|
#:more "consider adding a type annotation with `:'"
|
||||||
"identifier" (syntax-e e))]
|
"identifier" (syntax-e e))]
|
||||||
[#f (tc-error/expr "untyped top-level identifier ~a" (syntax-e e))]
|
[#f (tc-error/expr/fields "missing type for top-level identifier"
|
||||||
|
#:more "either undefined or missing a type annotation"
|
||||||
|
"identifier" (syntax-e e))]
|
||||||
[(list _ _ nominal-source-mod nominal-source-id _ _ _)
|
[(list _ _ nominal-source-mod nominal-source-id _ _ _)
|
||||||
(define-values (mod-path base-path)
|
(define-values (mod-path base-path)
|
||||||
(module-path-index-split nominal-source-mod))
|
(module-path-index-split nominal-source-mod))
|
||||||
|
|
|
@ -103,6 +103,10 @@
|
||||||
;; PR 14380
|
;; PR 14380
|
||||||
(test-form-not-exn (begin - (void)))
|
(test-form-not-exn (begin - (void)))
|
||||||
|
|
||||||
|
;; test message for undefined id
|
||||||
|
(test-form-exn #rx"either undefined or missing a type annotation"
|
||||||
|
(a-name-that-isnt-bound))
|
||||||
|
|
||||||
(test-form #rx"1"
|
(test-form #rx"1"
|
||||||
(:type 1))
|
(:type 1))
|
||||||
(test-form (regexp-quote "(U Positive-Byte Zero)")
|
(test-form (regexp-quote "(U Positive-Byte Zero)")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user