Opaque types may overlap with anything.

Closes PR 12434.
This commit is contained in:
Sam Tobin-Hochstadt 2011-12-09 18:02:40 -05:00
parent 596e7683b5
commit f23baef8aa
4 changed files with 20 additions and 2 deletions

View File

@ -0,0 +1,16 @@
#;
(exn-pred "'success")
;; PR 12434
(module B typed/racket
(require/typed racket
[opaque NN number?]
[pi NN])
(define a string)
;; => 'failure
(ann (match pi
[(list n) 'success]
[other 'failure])
(U #;'success 'failure)))

View File

@ -13,7 +13,7 @@
env? update-type/lexical env-map env-props replace-props)
scheme/contract racket/match
mzlib/trace unstable/struct
(typecheck tc-metafunctions)
"tc-metafunctions.rkt"
(for-syntax scheme/base))
;(trace replace-nth)

View File

@ -7,7 +7,7 @@
(env lexical-env type-env-structs)
(r:infer infer)
(utils tc-utils)
(typecheck tc-envops tc-metafunctions)
"tc-envops.rkt" "tc-metafunctions.rkt"
(types type-table)
syntax/kerncase
racket/trace

View File

@ -24,6 +24,8 @@
[(list _ (Univ:)) #t]
[(list (F: _) _) #t]
[(list _ (F: _)) #t]
[(list (Opaque: _ _) _) #t]
[(list _ (Opaque: _ _)) #t]
[(list (Name: n) (Name: n*))
(or (free-identifier=? n n*)
(overlap (resolve-once t1) (resolve-once t2)))]