diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/check-class-unit.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/check-class-unit.rkt index f445d9d0..dd732875 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/check-class-unit.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/check-class-unit.rkt @@ -200,7 +200,7 @@ (#%plain-app values))]) (#%plain-app void)))) -;; Syntax TCResults -> Type +;; Syntax Option -> TCResults ;; Type-check a class form by trawling its innards ;; ;; Assumptions: @@ -213,12 +213,12 @@ (define (check-class form [expected #f]) (match (and expected (resolve expected)) [(tc-result1: (and self-class-type (Class: _ _ _ _ _ _))) - (parse-and-check form self-class-type)] + (ret (parse-and-check form self-class-type))] [(tc-result1: (Poly-names: ns body-type)) ;; FIXME: this case probably isn't quite right (check-class form (ret body-type))] - [#f (parse-and-check form #f)] - [_ (check-below (parse-and-check form #f) expected)])) + [#f (ret (parse-and-check form #f))] + [_ (check-below (ret (parse-and-check form #f)) expected)])) ;; Syntax Option -> Type ;; Parse the syntax and extract useful information to pass to the diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/signatures.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/signatures.rkt index 95cb837b..6dd94b3a 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/signatures.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/signatures.rkt @@ -20,7 +20,7 @@ [cond-contracted check-subforms/with-handlers/check (syntax? tc-results/c . -> . any)])) (define-signature check-class^ - ([cond-contracted check-class (syntax? (or/c tc-results/c #f) . -> . any)])) + ([cond-contracted check-class (syntax? (or/c tc-results/c #f) . -> . tc-results/c)])) (define-signature tc-if^ ([cond-contracted tc/if-twoarm ((syntax? syntax? syntax?) (tc-results/c) . ->* . tc-results/c)])) diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-app/tc-app-hetero.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-app/tc-app-hetero.rkt index 1f010b41..1998e45c 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-app/tc-app-hetero.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-app/tc-app-hetero.rkt @@ -30,8 +30,8 @@ [_ (match (tc-expr expr) [(tc-result1: (Value: (? number? i))) i] - [type - (check-below type -Integer) + [tc-results + (check-below tc-results (ret -Integer)) #f])])) (define (index-error i-val i-bound expr type expected name) @@ -70,7 +70,7 @@ [(not i-val) (define val-t (single-value val-e)) (for ((es-type (in-list es-t))) - (check-below val-t es-type)) + (check-below val-t (ret es-type))) (cond-check-below (ret -Void) expected)] [else (single-value val-e) diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt index ec5e1065..e86f2963 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt @@ -374,7 +374,7 @@ (syntax-parse form #:literal-sets (kernel-literals tc-expr-literals) [stx:tr:class^ - (ret (check-class form #f))] + (check-class form #f)] ;; [stx:exn-handlers^ (register-ignored! form)