Skip to content

Commit 95163bd

Browse files
committed
add a test case for init for define-local-member-name
1 parent 2919a9f commit 95163bd

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

drracket-tool-test/tests/check-syntax/syncheck-direct.rkt

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,34 @@
620620
'((45 60) (163 178))
621621
'((45 60) (211 226))))
622622

623+
624+
625+
(check-equal?
626+
(for/set ([e (in-set
627+
(get-binding-arrows
628+
(string-append
629+
"(module m racket\n"
630+
" (define-local-member-name the-init-name)\n"
631+
" (define c%\n"
632+
" (class* object% ()\n"
633+
" (init [the-init-name (λ (x) x)])\n"
634+
" (set! the-init-name void)\n"
635+
" (list the-init-name)\n"
636+
" (the-init-name 5)\n"
637+
" (super-new))))\n")))]
638+
;; filter out arrows that don't start on the
639+
;; `the-init-name` that appears inside
640+
;; `define-local-member-name`
641+
#:when (equal? '(45 58) (car e)))
642+
e)
643+
(set
644+
'((45 58) (109 122))
645+
'((45 58) (147 160))
646+
'((45 58) (179 192))
647+
'((45 58) (201 214))))
648+
649+
650+
623651
;
624652
;
625653
;

0 commit comments

Comments
 (0)