Open
Description
What version of Racket are you using?
v7.4.0.1
with static contract optimizations disabled (this bug only manifests itself then).
What program did you run?
#lang racket
(module a typed/racket
(define-type T (Rec T (-> (U T String))))
(provide f)
(: f (-> T T))
(define (f x) x))
(require 'a)
(f (lambda () ""))
What should have happened?
No error.
If you got an error message, please include it here.
recursive-contract: contract violation
expected: flat-contract?
given: (-> (or/c String g639058))
The expansion into recursive-contract
includes #:flat
for a non-flat argument.
Metadata
Metadata
Assignees
Labels
No labels