diff --git a/collects/tests/typed-scheme/unit-tests/typecheck-tests.rkt b/collects/tests/typed-scheme/unit-tests/typecheck-tests.rkt index 93e88328..82a987df 100644 --- a/collects/tests/typed-scheme/unit-tests/typecheck-tests.rkt +++ b/collects/tests/typed-scheme/unit-tests/typecheck-tests.rkt @@ -811,7 +811,14 @@ [tc-err (do: : Void ([j : Natural (+ i 'a) (+ j i)]) ((>= j 10)) - #f)]) + #f)] + [tc-e/t + (let ([x eof]) + (if (procedure? x) + x + (lambda (z) (eq? x z)))) + (make-pred-ty (-val eof))] + ) (test-suite "check-type tests" (test-exn "Fails correctly" exn:fail:syntax? (lambda () (parameterize ([orig-module-stx #'here]) diff --git a/collects/typed-scheme/typecheck/tc-app.rkt b/collects/typed-scheme/typecheck/tc-app.rkt index d359b15f..aef7db1e 100644 --- a/collects/typed-scheme/typecheck/tc-app.rkt +++ b/collects/typed-scheme/typecheck/tc-app.rkt @@ -41,7 +41,7 @@ ;; typecheck eq? applications ;; identifier expr expr -> tc-results (define (tc/eq comparator v1 v2) - (define (eq?-able e) (or (boolean? e) (keyword? e) (symbol? e))) + (define (eq?-able e) (or (boolean? e) (keyword? e) (symbol? e) (eof-object? e))) (define (eqv?-able e) (or (eq?-able e) (number? e))) (define (equal?-able e) #t) (define (ok? val)