Skip to content

Fix TaCompositionElement>>selectors returning duplicated selectors#19764

Open
PrasannaBhavan2005 wants to merge 1 commit into
pharo-project:Pharo14from
PrasannaBhavan2005:fix/ta-composition-element-duplicate-selectors
Open

Fix TaCompositionElement>>selectors returning duplicated selectors#19764
PrasannaBhavan2005 wants to merge 1 commit into
pharo-project:Pharo14from
PrasannaBhavan2005:fix/ta-composition-element-duplicate-selectors

Conversation

@PrasannaBhavan2005

Copy link
Copy Markdown

…ctors

TaCompositionElement>>selectors was concatenating localSelectors with traitComposition selectors without deduplicating. When a method is defined both locally in the trait and in one of its used traits, the selector appeared multiple times in the returned collection.

Fixed by converting to a Set before converting back to an Array, matching the approach already used in TaSequence>>selectors.

Resolves #19744

…ctors

TaCompositionElement>>selectors was concatenating localSelectors with
traitComposition selectors without deduplicating. When a method is
defined both locally in the trait and in one of its used traits, the
selector appeared multiple times in the returned collection.

Fixed by converting to a Set before converting back to an Array,
matching the approach already used in TaSequence>>selectors.

Resolves pharo-project#19744
@jecisc

jecisc commented Jun 7, 2026

Copy link
Copy Markdown
Member

For info I fixed this bug in this PR on top of speeding up the trait recompilation:

#19745

@PrasannaBhavan2005

Copy link
Copy Markdown
Author

Hi @jecisc it was showing in the issues list, I didn't see that it was already resolved
but is it resolving the issues tho?

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.

TaCompositionElement>>selectors return a collection with duplicated selectors

2 participants