Fix `possible-domains' function in TR internals
This fixes type error message generation in some cases and also the `query-type/result` command on multiple valued functions. The latter still does not allow multiple return type queries (TODO) but it won't crash now. Closes PR 14493 original commit: 881d5de9a0202f09fb5ff8baedcf75b13fa5c294
This commit is contained in:
parent
5f3ed34764
commit
5cb96eff46
|
@ -230,8 +230,9 @@
|
|||
[(Values: (list (Result: t _ _)))
|
||||
t]
|
||||
[(ValuesDots: (list (Result: t _ _)) _ _)
|
||||
t])])
|
||||
(subtype rng expected-ty))]))))
|
||||
t]
|
||||
[_ #f])])
|
||||
(and rng (subtype rng expected-ty)))]))))
|
||||
|
||||
(define orig (map list doms rngs rests drests))
|
||||
|
||||
|
|
|
@ -168,4 +168,6 @@
|
|||
(test-form-exn #rx"exactly two arguments"
|
||||
(:query-type/result))
|
||||
(test-form-exn #rx"exactly two arguments"
|
||||
(:query-type/result 1 2 3))))
|
||||
(:query-type/result 1 2 3))
|
||||
(test-form #rx"not in the given function's range"
|
||||
(:query-type/result syntax-local-expand-expression Boolean))))
|
||||
|
|
|
@ -3123,6 +3123,15 @@
|
|||
y)
|
||||
#:ret (ret -String -true-filter)
|
||||
#:msg #rx"expected: String.*given: (Null|'\\(\\))"]
|
||||
|
||||
;; PR 14493
|
||||
[tc-err
|
||||
(let ()
|
||||
(define f values)
|
||||
(: g (Any -> Boolean))
|
||||
(define (g x) (f x))
|
||||
(error "foo"))
|
||||
#:msg #rx"Polymorphic function `f' could not be applied"]
|
||||
)
|
||||
|
||||
(test-suite
|
||||
|
|
Loading…
Reference in New Issue
Block a user