10BC0 Fix constructor inheritance by supersaiyansubtlety · Pull Request #351 · QuiltMC/enigma · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@supersaiyansubtlety
Copy link
Member
@supersaiyansubtlety supersaiyansubtlety commented Dec 14, 2025

fixes #349

  • adds a check to IndexEntryResolver to make constructors always resolve to themselves
  • removes redundant instanceof ClassEntry checks that could never be true because getClassChild already excluded them

@supersaiyansubtlety supersaiyansubtlety self-assigned this Dec 14, 2025
@supersaiyansubtlety supersaiyansubtlety added bug Something isn't working backend affects the enigma backend labels Dec 14, 2025
// Fields can't be redefined, don't search them up the hierarchy
// Constructors can't be redefined, don't search them up the hierarchy
if (
(access != null && (access.isPrivate() || access.isStatic() || entry instanceof FieldEntry))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this only checks for FieldEntrys when access is non-null, as before
that doesn't seem correct, but changing it breaks tests

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @IotaBread
reordering the check breaks shadow behaviour
i don't know exactly when the access will be null -- if we can predict which fields will have their definitions indexed, we need to document our reliance on that behaviour, and if we can't, this needs to be changed

@supersaiyansubtlety supersaiyansubtlety linked an issue Dec 14, 2025 that may be closed by this pull request
@ix0rai ix0rai self-requested a review January 16, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend affects the enigma backend bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Constructors resolve to super constructors

2 participants

0