fix some dumb bugs

svn: r11082
This commit is contained in:
Sam Tobin-Hochstadt 2008-08-05 15:05:25 +00:00
parent ee2a6f7ceb
commit ad2b2b3199
2 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@
[(Instance t)
(eq? (syntax-e #'Instance) 'Instance)
(let ([v (parse-type #'t)])
(if (or (Mu? v) (Class? v) (Union? v))
(if (not (or (Mu? v) (Class? v) (Union? v)))
(begin (tc-error/delayed "Argument to Instance must be a class type, got ~a" v)
(make-Instance (Un)))
(make-Instance v)))]

View File

@ -313,7 +313,7 @@
[(tc-result: (Value: (? symbol? s)))
(let* ([ftype (cond [(assq s methods) => cadr]
[else (tc-error/expr "send: method ~a not understood by class ~a" s c)])]
[ret-ty (tc/funapp rcvr args (ret ftype) (map tc-expr (syntax->list args)))])
[ret-ty (tc/funapp rcvr args (ret ftype) (map tc-expr (syntax->list args)) expected)])
(if expected
(begin (check-below ret-ty expected) (ret expected))
ret-ty))]