diff --git a/collects/honu/private/typechecker/typecheck-expression.ss b/collects/honu/private/typechecker/typecheck-expression.ss index 2d9472fbc3..64cbf4057d 100644 --- a/collects/honu/private/typechecker/typecheck-expression.ss +++ b/collects/honu/private/typechecker/typecheck-expression.ss @@ -372,7 +372,7 @@ (let ([class-entry (get-class-entry tenv class)] [new-type (if type type ctype)]) ;; the following can only be triggered if the type annontation isn't a type - (if (not (type-valid? tenv new-type)) + (if (and type (not (type-valid? tenv type))) (raise-read-error-with-stx (format "Type annotation ~a on new statement is not a valid type" (printable-type new-type)) (honu:ast-stx new-type)))