<p dir="ltr">Can we make this error message a little more informative? People find this confusing.</p>
<p dir="ltr">Sam</p>
<div class="gmail_quote">On Jun 26, 2014 2:22 AM,  <<a href="mailto:asumu@racket-lang.org">asumu@racket-lang.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
asumu has updated `master' from 5339cbaac9 to 9a14c9c420.<br>
  <a href="http://git.racket-lang.org/plt/5339cbaac9..9a14c9c420" target="_blank">http://git.racket-lang.org/plt/5339cbaac9..9a14c9c420</a><br>
<br>
=====[ One Commit ]=====================================================<br>
Directory summary:<br>
  44.4% pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/<br>
  55.5% pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/<br>
<br>
~~~~~~~~~~<br>
<br>
9a14c9c Asumu Takikawa <<a href="mailto:asumu@racket-lang.org">asumu@racket-lang.org</a>> 2014-06-26 01:35<br>
:<br>
| Fix error for application Procedure type values<br>
|<br>
| Removal of top-arr in the internal representation changed<br>
| the error message and we didn't have a test for it.<br>
|<br>
| Closes PR 14601<br>
:<br>
  M .../tests/typed-racket/unit-tests/typecheck-tests.rkt        | 7 +++++++<br>
  M .../typed-racket/typecheck/tc-app-helper.rkt                 | 3 ++-<br>
<br>
=====[ Overall Diff ]===================================================<br>
<br>
pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-app-helper.rkt<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
--- OLD/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-app-helper.rkt<br>
+++ NEW/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-app-helper.rkt<br>
@@ -105,7 +105,8 @@<br>
                       (if tail-bound (cons tail-ty tail-bound) #f)))<br>
   (cond<br>
     [(null? doms)<br>
-     (int-err "How could doms be null: ~a" ty)]<br>
+     (tc-error/expr "cannot apply function of type Procedure"<br>
+                    #:return return)]<br>
     [(and (= 1 (length doms)) (not (car rests)) (not (car drests)) (not tail-ty) (not tail-bound))<br>
      (tc-error/expr<br>
       #:return return<br>
<br>
pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/typecheck-tests.rkt<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
--- OLD/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/typecheck-tests.rkt<br>
+++ NEW/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/typecheck-tests.rkt<br>
@@ -3106,6 +3106,13 @@<br>
          ((if (even? 4) add1 (inst values Integer)) 4)<br>
          -Int]<br>
<br>
+       ;; PR 14601<br>
+       [tc-err<br>
+        (let ()<br>
+          (: f Procedure)<br>
+          (define f (lambda () 'hi))<br>
+          (f))<br>
+        #:msg "cannot apply function of type Procedure"]<br>
         )<br>
<br>
   (test-suite<br>
</blockquote></div>