Skip to content

Commit 74a18c2

Browse files
samthrmculpepper
authored andcommitted
Fix accidental use of the wrong letrec-bound variable.
(cherry picked from commit 0e71f2d)
1 parent 8bffa07 commit 74a18c2

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
@@ -12,7 +12,7 @@
1212
(define (wrap-struct s)
1313
(define (extract-functions struct-type)
1414
(define-values (sym init auto ref set! imms par skip?)
15-
(struct-type-info type))
15+
(struct-type-info struct-type))
1616
(when skip? (fail s)) ;; "Opaque struct type!")
1717
(define-values (fun/chap-list _)
1818
(for/fold ([res null]
@@ -34,7 +34,7 @@
3434
res)
3535
imms))))
3636
(cond
37-
[par (cons fun/chap-list (extract-functions par))]
37+
[par (append fun/chap-list (extract-functions par))]
3838
[else fun/chap-list]))
3939
(define-values (type skipped?) (struct-info s))
4040
(when skipped? (fail s)); "Opaque struct type!"

0 commit comments

Comments
 (0)