Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix default behavior of literalEqual: #17467

Open
wants to merge 2 commits into
base: Pharo13
Choose a base branch
from

Conversation

guillep
Copy link
Member

@guillep guillep commented Nov 27, 2024

Do not share literals by default.
Instead, do it if users explicitly request so in their implementation of literalEqual:

Add tests

Fixes #17264
=> the reason is that reflectivity pushes AST nodes to the literal frame, and literal nodes are consireded equal if they have the same contents (regarless of their position in the tree). Thus, two similar nodes in different part of the trees were considered equals and shared, avoiding reflectivity to call the right method on the right node.

@guillep guillep changed the base branch from Pharo12 to Pharo13 November 27, 2024 16:20
Do not share literals by default.
Instead, do it if users explicitly request so in their implementation of literalEqual:

Add tests
@Ducasse
Copy link
Member

Ducasse commented Nov 27, 2024

Strange that we get this test broken

MacOSX64.PharoDocComment.Tests.CommentTestCase.nil (from PharoDocComment-Tests)

@guillep
Copy link
Member Author

guillep commented Nov 28, 2024

Looks like the doc comments integration with the CI is very bad at giving feedback :(

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.

Coverage collector picks first node that matches instead of covered node
2 participants