Fix misuse of expected in tc-send.

original commit: 8de32baf28b507db1d834349a8d8289992e447bf
This commit is contained in:
Eric Dobson 2014-03-20 21:54:17 -07:00
parent aa6c6e96e3
commit df3d7d642b
2 changed files with 5 additions and 1 deletions

View File

@ -28,7 +28,7 @@
retval)]
[(tc-result1: t) (int-err "non-symbol methods not supported by Typed Racket: ~a" t)])]
[(tc-result1: t) (tc-error/expr/fields
#:return (or expected (ret -Bottom))
#:return (ret -Bottom)
"send: type mismatch"
"expected" "an object"
"given" t)]))

View File

@ -104,6 +104,10 @@
(define/public (m x) (n))))
(void))
-Void]
;; Send to non object
[tc-err (send 4 m 3)
#:ret (ret (-val 5))
#:expected (ret (-val 5) -no-filter -no-obj)]
;; Field access via get-field
[tc-e (let ()
(: j% (Class (field [n Integer])