racket / racket/racket

`define/generic` doesn't tell check-syntax about use of method name

Open
#2,027 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Racket
Stars
5.2k
Forks
698
Avg merge
18h 34m
Merged PRs (30d)
5

Description

For example in the program:

#lang racket
(require racket/generic)
(define-generics test
  (name1 test))
(struct a ()
  #:methods gen:test
  [(define/generic super name1)
   (define (name1 self) super)])

If I rename name1 to a-different-name, the name1 in define/generic does not get renamed (and no binding arrow shows up for that name1)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the minimal #lang racket example using racket/generic, define-generics, and define/generic, then inspect how check-syntax resolves and tracks the method name. Done means renaming name1 updates the define/generic reference and displays its binding arrow.

Written by the indexing model from the issue text.

Assessment

Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.