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:
Asumu Takikawa 2014-06-26 01:35:32 -04:00
parent 671ad37a5b
commit 7f44bfec8b
2 changed files with 9 additions and 1 deletions

View File

@ -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

View File

@ -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