fix a bug in ->i parsing
This commit is contained in:
parent
03751b8f34
commit
48b2410755
|
@ -172,7 +172,10 @@ code does the parsing and validation of the syntax.
|
|||
(set! sp (cons from sp))
|
||||
(free-identifier-mapping-put!
|
||||
neighbors from
|
||||
(cons to (free-identifier-mapping-get neighbors from (λ () '())))))
|
||||
(cons to (free-identifier-mapping-get neighbors from))))
|
||||
|
||||
(define (init-neighbors var)
|
||||
(free-identifier-mapping-put! neighbors var '()))
|
||||
|
||||
(define (no-links from)
|
||||
(set! sp (cons from sp))
|
||||
|
@ -182,6 +185,7 @@ code does the parsing and validation of the syntax.
|
|||
(for ([a-res (in-list arg/ress)])
|
||||
(cond
|
||||
[(arg/res-vars a-res)
|
||||
(init-neighbors (arg/res-var a-res))
|
||||
(for ([nvar (in-list (arg/res-vars a-res))])
|
||||
(link (arg/res-var a-res) nvar))]
|
||||
[else
|
||||
|
@ -196,6 +200,7 @@ code does the parsing and validation of the syntax.
|
|||
(when a-rst
|
||||
(cond
|
||||
[(arg/res-vars a-rst)
|
||||
(init-neighbors (arg/res-var a-rst))
|
||||
(for ([nvar (in-list (arg/res-vars a-rst))])
|
||||
(link (arg/res-var a-rst) nvar))]
|
||||
[else
|
||||
|
|
|
@ -3341,6 +3341,13 @@
|
|||
'neg)
|
||||
1))
|
||||
|
||||
;; this used to cause a runtime error in the code that parses ->i
|
||||
(ctest 'no-crash
|
||||
'->i-no-vars-with-dep
|
||||
(begin (->i ([x () any/c] [y (x) any/c]) any) 'no-crash))
|
||||
|
||||
|
||||
|
||||
;
|
||||
;
|
||||
;
|
||||
|
@ -12854,7 +12861,7 @@ so that propagation occurs.
|
|||
'pos
|
||||
'neg))
|
||||
(f 10)))
|
||||
|
||||
|
||||
|
||||
|
||||
;
|
||||
|
|
Loading…
Reference in New Issue
Block a user