erase object when inst is present (#572)
This commit is contained in:
parent
9a6c1ba63d
commit
f2bf1062bc
|
@ -58,7 +58,11 @@
|
|||
number))
|
||||
(match tc-res
|
||||
[(tc-results: (list (tc-result: t ps o)) #f)
|
||||
(ret (inst-type t inst) ps o)]
|
||||
;; we erase 'o' -- if they bothered to put an instantiation,
|
||||
;; odds are this is not something where 'o' matters, and leaving
|
||||
;; 'o' can cause complications (see TR gh issue 561) -- maybe there's
|
||||
;; a better way? this seems totally fine for now
|
||||
(ret (inst-type t inst) ps -empty-obj)]
|
||||
[_ (error-case (if (and (tc-results? tc-res)
|
||||
(null? (tc-results-ts tc-res)))
|
||||
0
|
||||
|
|
|
@ -1188,7 +1188,7 @@
|
|||
((-lst y) y)
|
||||
. ->... . (-lst z)))
|
||||
: -true-propset
|
||||
: (-id-path #'map)))]
|
||||
: -empty-obj))]
|
||||
|
||||
;; error tests
|
||||
[tc-err (+ 3 #f)]
|
||||
|
@ -3966,6 +3966,10 @@
|
|||
;; * Check that when passed as a #:∀ type, the inferred type is Char
|
||||
[tc-e #\b -Char]
|
||||
[tc-e (ann #\b Char) -Char]
|
||||
;; TR github issue 561
|
||||
[tc-e (let ([a (inst cons Integer Integer)])
|
||||
(cons #f #f))
|
||||
(-pair -False -False)]
|
||||
)
|
||||
|
||||
(test-suite
|
||||
|
|
Loading…
Reference in New Issue
Block a user