Skip to content

class: bind inherited nams using superclass or interface reference#794

Merged
mflatt merged 1 commit into
racket:masterfrom
mflatt:inherit-bind
Jul 2, 2026
Merged

class: bind inherited nams using superclass or interface reference#794
mflatt merged 1 commit into
racket:masterfrom
mflatt:inherit-bind

Conversation

@mflatt

@mflatt mflatt commented Jun 30, 2026

Copy link
Copy Markdown
Member

In issue #793, the problem is that class.together changes each class form to define a name that is hidden by scopes, and then introduce the original name as an alias. Meanwhile, inherited fields and methods are bound using the defined class name. This commit changes inherited names and fields to be bound using the reference to a superclass or interface, instead. That avoids a problem with class.together specifically, but also seems like more the right choice in general.

This is a backward-incompatible change. I'm not expecting any current programs to break, but it's possible. In particular, there could be Rhombus programs already that macro-introduce a superclass or interface reference, and this change will cause inherited field and method names to be bound as macro-introduced.

@mflatt mflatt merged commit 04bc7c9 into racket:master Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant