Fix accidental use of the wrong letrec-bound variable.
This commit is contained in:
parent
b2b350eff5
commit
0e71f2d5dc
15
collects/tests/typed-racket/succeed/exn-any.rkt
Normal file
15
collects/tests/typed-racket/succeed/exn-any.rkt
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
#lang racket/load
|
||||||
|
|
||||||
|
(module m typed/racket
|
||||||
|
(struct: s ())
|
||||||
|
|
||||||
|
(struct: s2 s ())
|
||||||
|
(define: v : Any (s2))
|
||||||
|
(provide v))
|
||||||
|
|
||||||
|
(module n racket
|
||||||
|
(require 'm)
|
||||||
|
v)
|
||||||
|
|
||||||
|
(require 'n)
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
(define (wrap-struct s)
|
(define (wrap-struct s)
|
||||||
(define (extract-functions struct-type)
|
(define (extract-functions struct-type)
|
||||||
(define-values (sym init auto ref set! imms par skip?)
|
(define-values (sym init auto ref set! imms par skip?)
|
||||||
(struct-type-info type))
|
(struct-type-info struct-type))
|
||||||
(when skip? (fail s)) ;; "Opaque struct type!")
|
(when skip? (fail s)) ;; "Opaque struct type!")
|
||||||
(define-values (fun/chap-list _)
|
(define-values (fun/chap-list _)
|
||||||
(for/fold ([res null]
|
(for/fold ([res null]
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
res)
|
res)
|
||||||
imms))))
|
imms))))
|
||||||
(cond
|
(cond
|
||||||
[par (cons fun/chap-list (extract-functions par))]
|
[par (append fun/chap-list (extract-functions par))]
|
||||||
[else fun/chap-list]))
|
[else fun/chap-list]))
|
||||||
(define-values (type skipped?) (struct-info s))
|
(define-values (type skipped?) (struct-info s))
|
||||||
(when skipped? (fail s)); "Opaque struct type!"
|
(when skipped? (fail s)); "Opaque struct type!"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user