Skip to content

Conversation

som-snytt
Copy link
Contributor

@som-snytt som-snytt commented Sep 10, 2025

Sibling givens are always eligible for derived members,
which are appended to the enclosing template.

Fixes #23897

Why was the ticket worth tackling?

The behavior change is a regression that makes derived less intuitive.
User-written code is logically antecedent to synthetic derived code.

How I fixed it

I merely confirmed the diagnosis by @mrdziuban on the ticket.
Instead of fiddling with positions, the fix takes derived members as a special case,
where derived members always follow other members.
Perhaps all definitions with a synthetic, zero-extent span deserve the same consideration.

Why is this PR worth reviewing?

It is one LOC that is easy to review if the premise is agreed upon in principle.

What's the worse that could happen?

Existing code that relies on the changed behavior may break.

Sibling givens are always eligible for derived members,
which are appended to the enclosing template.
@som-snytt som-snytt force-pushed the issue/23897-derives-pos branch from 26b2745 to 59943eb Compare October 4, 2025 11:50
@som-snytt som-snytt marked this pull request as ready for review October 4, 2025 11:53
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.

Derived instances fail to discover givens in the type's companion object
1 participant