Fix type of parameter? to correctly account for variance.
Closes PR 14315. original commit: 4e9d15306c604a759d10005af557783f7d410477
This commit is contained in:
parent
5bd25a94a6
commit
9926acb187
|
@ -1210,7 +1210,7 @@
|
|||
[make-parameter (-poly (a b) (cl-> [(a) (-Param a a)]
|
||||
[(b (a . -> . b)) (-Param a b)]))]
|
||||
[make-derived-parameter (-poly (a b c d) (-> (-Param a b) (-> c a) (-> b d) (-Param c d)))]
|
||||
[parameter? (make-pred-ty (-poly (a b) (-Param a b)))]
|
||||
[parameter? (make-pred-ty (-Param -Bottom Univ))]
|
||||
[parameter-procedure=? (-poly (a b c d) (-> (-Param a b) (-Param c d) B))]
|
||||
|
||||
[current-parameterization (-> -Parameterization)]
|
||||
|
|
|
@ -1948,6 +1948,14 @@
|
|||
#:ret (ret (list (-val 'a) (-val 'b)))]
|
||||
[tc-e (call-with-input-bytes #"abcd" (lambda: ([input : Input-Port]) (values 'a 'b)))
|
||||
#:ret (ret (list (-val 'a) (-val 'b)))]
|
||||
|
||||
[tc-e (lambda: ([x : (U (Parameter Symbol) Symbol)])
|
||||
(if (parameter? x)
|
||||
(x)
|
||||
x))
|
||||
#:ret (ret (t:-> (t:Un (-Param -Symbol -Symbol) -Symbol) -Symbol))
|
||||
#:expected (ret (t:-> (t:Un (-Param -Symbol -Symbol) -Symbol) -Symbol))]
|
||||
|
||||
)
|
||||
(test-suite
|
||||
"tc-literal tests"
|
||||
|
|
Loading…
Reference in New Issue
Block a user