Handling Lit values in inference.

This commit is contained in:
Alex Shinn 2011-11-10 05:18:18 +09:00
parent cafcad3ca4
commit 16c586f053

View file

@ -166,13 +166,15 @@
f-type)
(else
Object))))))
(($ Lit value)
(type-of value))
(else
(type-of x))))
(define (resolve-delayed-type x)
(let lp ((x x) (seen '()) (default Object))
(match x
(('return-type f)
(('return-type (? lambda? f))
(if (memq f seen)
default
(lp (lambda-return-type f) (cons f seen) default)))