Opaque types may overlap with anything.
Closes PR 12434.
This commit is contained in:
parent
596e7683b5
commit
f23baef8aa
16
collects/tests/typed-racket/fail/opaque-overlap.rkt
Normal file
16
collects/tests/typed-racket/fail/opaque-overlap.rkt
Normal 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)))
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)))]
|
||||
|
|
Loading…
Reference in New Issue
Block a user