Open
Description
What version of Racket are you using?
8.0.900
What program did you run?
#lang racket
(module foo typed/racket
(provide f)
(define-type Untidy (U (Pair 1 Any) (Pair 0 Any)))
(define (f [val : Any]) : (U False Untidy)
(cons 1 0)))
(require 'foo)
(f 123)
(Thanks to @mfelleisen for reducing the failure.)
What should have happened?
program should have evaluated to (cons 1 0)
If you got an error message, please include it here.
../../Applications/Racket v8.0.900/collects/racket/contract/private/blame.rkt:346:0: f: broke its own contract
two of the clauses in the or/c might both match: (cons/c any/c Any) and (cons/c any/c Any)
produced: '(1 . 0)
in: the range of
(->
any/c
(or/c
#f
(cons/c any/c Any)
(cons/c any/c Any)))
contract from: (anonymous-module foo)
blaming: (anonymous-module foo)
(assuming the contract is correct)
at: 13-unsaved-editor:10.10