Skip to content

fix: resolve bare change members against inherited attributes#452

Open
hjotha wants to merge 2 commits intomendixlabs:mainfrom
hjotha:submit/change-member-inherited-attribute
Open

fix: resolve bare change members against inherited attributes#452
hjotha wants to merge 2 commits intomendixlabs:mainfrom
hjotha:submit/change-member-inherited-attribute

Conversation

@hjotha
Copy link
Copy Markdown
Contributor

@hjotha hjotha commented Apr 30, 2026

Closes #451.

Summary

  • resolve bare change-object members against the entity generalization chain before falling back to the concrete entity
  • preserve the declaring entity qualified name for inherited attributes
  • add a synthetic regression test for a child entity changing an attribute declared by its parent

Validation

  • make build
  • make test
  • targeted roundtrip with mx check for an inherited bare attribute case

Symptom: a change-object member assignment to an inherited attribute could roundtrip into an attribute qualified on the concrete child entity, causing mx check to report that the selected attribute no longer exists.

Root cause: resolveMemberChange qualified bare attributes with the variable's concrete entity only and did not walk the entity generalization chain.

Fix: when entity metadata is available, resolve bare attribute names against the entity and its ancestors and write the declaring entity qualified name.

Tests: added a synthetic inherited-attribute resolver test, ran make build, make test, and a targeted roundtrip with mx check.
@ako ako added this to the v0.8.0 milestone Apr 30, 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.

Change-object writer qualifies inherited bare attributes on the child entity

3 participants