Fix error for application Procedure type values
Removal of top-arr in the internal representation changed the error message and we didn't have a test for it. Closes PR 14601 original commit: 9a14c9c4206671d9627b5a7bbc48b76e9f95526e
This commit is contained in:
parent
671ad37a5b
commit
7f44bfec8b
|
@ -105,7 +105,8 @@
|
|||
(if tail-bound (cons tail-ty tail-bound) #f)))
|
||||
(cond
|
||||
[(null? doms)
|
||||
(int-err "How could doms be null: ~a" ty)]
|
||||
(tc-error/expr "cannot apply function of type Procedure"
|
||||
#:return return)]
|
||||
[(and (= 1 (length doms)) (not (car rests)) (not (car drests)) (not tail-ty) (not tail-bound))
|
||||
(tc-error/expr
|
||||
#:return return
|
||||
|
|
|
@ -3106,6 +3106,13 @@
|
|||
((if (even? 4) add1 (inst values Integer)) 4)
|
||||
-Int]
|
||||
|
||||
;; PR 14601
|
||||
[tc-err
|
||||
(let ()
|
||||
(: f Procedure)
|
||||
(define f (lambda () 'hi))
|
||||
(f))
|
||||
#:msg "cannot apply function of type Procedure"]
|
||||
)
|
||||
|
||||
(test-suite
|
||||
|
|
Loading…
Reference in New Issue
Block a user