mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-22 07:09:18 +02:00
Handling Lit values in inference.
This commit is contained in:
parent
cafcad3ca4
commit
16c586f053
1 changed files with 3 additions and 1 deletions
|
@ -166,13 +166,15 @@
|
||||||
f-type)
|
f-type)
|
||||||
(else
|
(else
|
||||||
Object))))))
|
Object))))))
|
||||||
|
(($ Lit value)
|
||||||
|
(type-of value))
|
||||||
(else
|
(else
|
||||||
(type-of x))))
|
(type-of x))))
|
||||||
|
|
||||||
(define (resolve-delayed-type x)
|
(define (resolve-delayed-type x)
|
||||||
(let lp ((x x) (seen '()) (default Object))
|
(let lp ((x x) (seen '()) (default Object))
|
||||||
(match x
|
(match x
|
||||||
(('return-type f)
|
(('return-type (? lambda? f))
|
||||||
(if (memq f seen)
|
(if (memq f seen)
|
||||||
default
|
default
|
||||||
(lp (lambda-return-type f) (cons f seen) default)))
|
(lp (lambda-return-type f) (cons f seen) default)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue