diff --git a/typed-racket-lib/typed-racket/types/type-table.rkt b/typed-racket-lib/typed-racket/types/type-table.rkt index 53c07bab..76a21c41 100644 --- a/typed-racket-lib/typed-racket/types/type-table.rkt +++ b/typed-racket-lib/typed-racket/types/type-table.rkt @@ -69,8 +69,7 @@ old) (tooltip (cons e seen) t))) (tooltip (list e) t))) - (when (optimize?) - (hash-update! type-table e (combine t) t))) + (hash-update! type-table e (combine t) t)) ;; when typechecking a case-> type, types get added for ;; the same subexpression multiple times, combine them diff --git a/typed-racket-test/succeed/gh-issue-343.rkt b/typed-racket-test/succeed/gh-issue-343.rkt new file mode 100644 index 00000000..2a5d04b9 --- /dev/null +++ b/typed-racket-test/succeed/gh-issue-343.rkt @@ -0,0 +1,9 @@ +#lang typed/racket/base #:no-optimize +(require typed/racket/class) + +(define c% + (class object% + (init-field val) + (super-new))) + +(instantiate c% (3))