diff --git a/collects/typed-scheme/private/parse-type.ss b/collects/typed-scheme/private/parse-type.ss index b8e08515f7..2b92c493d6 100644 --- a/collects/typed-scheme/private/parse-type.ss +++ b/collects/typed-scheme/private/parse-type.ss @@ -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)))] diff --git a/collects/typed-scheme/private/tc-expr-unit.ss b/collects/typed-scheme/private/tc-expr-unit.ss index 8d7c4fedcf..feb7129a36 100644 --- a/collects/typed-scheme/private/tc-expr-unit.ss +++ b/collects/typed-scheme/private/tc-expr-unit.ss @@ -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))]