Adjust TR error message for consistency
The non-productive type check in type parsing and in type alias setup should produce the same failure messages.
This commit is contained in:
parent
4ee5f3f653
commit
5431ddb6c1
|
@ -71,9 +71,10 @@
|
|||
[((PolyRow: _ _ body)) (check body)]
|
||||
[(_) #t])
|
||||
(unless (check type)
|
||||
(tc-error/stx
|
||||
id
|
||||
"Recursive types are not allowed directly inside their definition")))
|
||||
(tc-error/fields
|
||||
"parse error in type"
|
||||
#:stx id
|
||||
#:more "recursive types are not allowed directly inside their definition")))
|
||||
|
||||
;; get-type-alias-info : Listof<Syntax> -> Listof<Id> Dict<Id, TypeAliasInfo>
|
||||
;;
|
||||
|
|
|
@ -2615,9 +2615,9 @@
|
|||
[tc-err (let () (define-type-alias A (Class #:implements A)) "dummy")
|
||||
#:msg "Recursive #:implements clause not allowed"]
|
||||
[tc-err (let () (define-type-alias X (U X #f)) "dummy")
|
||||
#:msg "Recursive types are not allowed directly inside"]
|
||||
#:msg "recursive types are not allowed directly inside"]
|
||||
[tc-err (let () (define-type-alias X (All (A #:row) X)) "dummy")
|
||||
#:msg "Recursive types are not allowed directly inside"]
|
||||
#:msg "recursive types are not allowed directly inside"]
|
||||
|
||||
;; Check the more precise Tarjan's algorithm-based letrec-values type checking
|
||||
[tc-e ;; An example from Eric Dobson (see gh372) that shows that precisely
|
||||
|
|
Loading…
Reference in New Issue
Block a user