Skip to content

Commit 0e71f2d

Browse files
committed
Fix accidental use of the wrong letrec-bound variable.
1 parent b2b350e commit 0e71f2d

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#lang racket/load
2+
3+
(module m typed/racket
4+
(struct: s ())
5+
6+
(struct: s2 s ())
7+
(define: v : Any (s2))
8+
(provide v))
9+
10+
(module n racket
11+
(require 'm)
12+
v)
13+
14+
(require 'n)
15+

collects/typed-racket/utils/any-wrap.rkt

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
(define (wrap-struct s)
1515
(define (extract-functions struct-type)
1616
(define-values (sym init auto ref set! imms par skip?)
17-
(struct-type-info type))
17+
(struct-type-info struct-type))
1818
(when skip? (fail s)) ;; "Opaque struct type!")
1919
(define-values (fun/chap-list _)
2020
(for/fold ([res null]
@@ -36,7 +36,7 @@
3636
res)
3737
imms))))
3838
(cond
39-
[par (cons fun/chap-list (extract-functions par))]
39+
[par (append fun/chap-list (extract-functions par))]
4040
[else fun/chap-list]))
4141
(define-values (type skipped?) (struct-info s))
4242
(when skipped? (fail s)); "Opaque struct type!"

0 commit comments

Comments
 (0)