fix some dumb bugs
svn: r11082
This commit is contained in:
parent
ee2a6f7ceb
commit
ad2b2b3199
|
@ -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)))]
|
||||
|
|
|
@ -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))]
|
||||
|
|
Loading…
Reference in New Issue
Block a user