Correctly recreate Scopes. Closes PR 10552. Closes PR 11532.
original commit: ce0f542028e9dfe5b18964223af8dad32ce04f57
This commit is contained in:
parent
6fcdd9ce43
commit
74ac6a4d22
5
collects/tests/typed-scheme/succeed/pr10552.rkt
Normal file
5
collects/tests/typed-scheme/succeed/pr10552.rkt
Normal file
|
@ -0,0 +1,5 @@
|
|||
#lang typed-scheme
|
||||
|
||||
(: z (All (A) (A -> ((Listof A) A -> (Listof A)))))
|
||||
(define (z _) (lambda (x y) (cons y x)))
|
||||
(define zz (z cons))
|
4
collects/tests/typed-scheme/succeed/pr11532.rkt
Normal file
4
collects/tests/typed-scheme/succeed/pr11532.rkt
Normal file
|
@ -0,0 +1,4 @@
|
|||
#lang typed/racket
|
||||
(define-type T (All [X Y ...] String))
|
||||
(: f (All [A] (T -> Any)))
|
||||
(define f void)
|
|
@ -517,10 +517,10 @@
|
|||
[#:Mu (Scope: body) (*Mu (*Scope (loop (add1 outer) body)))]
|
||||
[#:PolyDots n body*
|
||||
(let ([body (remove-scopes n body*)])
|
||||
(*PolyDots n (*Scope (loop (+ n outer) body))))]
|
||||
(*PolyDots n (add-scopes n (loop (+ n outer) body))))]
|
||||
[#:Poly n body*
|
||||
(let ([body (remove-scopes n body*)])
|
||||
(*Poly n (*Scope (loop (+ n outer) body))))])))
|
||||
(*Poly n (add-scopes n (loop (+ n outer) body))))])))
|
||||
(let ([n (length names)])
|
||||
(let loop ([ty ty] [names names] [count (sub1 n)])
|
||||
(if (zero? count)
|
||||
|
@ -568,10 +568,10 @@
|
|||
[#:Mu (Scope: body) (*Mu (*Scope (loop (add1 outer) body)))]
|
||||
[#:PolyDots n body*
|
||||
(let ([body (remove-scopes n body*)])
|
||||
(*PolyDots n (*Scope (loop (+ n outer) body))))]
|
||||
(*PolyDots n (add-scopes n (loop (+ n outer) body))))]
|
||||
[#:Poly n body*
|
||||
(let ([body (remove-scopes n body*)])
|
||||
(*Poly n (*Scope (loop (+ n outer) body))))])))
|
||||
(*Poly n (add-scopes n (loop (+ n outer) body))))])))
|
||||
(let ([n (length images)])
|
||||
(let loop ([ty (remove-scopes n sc)] [images images] [count (sub1 n)])
|
||||
(if (zero? count)
|
||||
|
|
Loading…
Reference in New Issue
Block a user