Skip to content

Conversation

@som-snytt
Copy link
Contributor

@som-snytt som-snytt commented Dec 7, 2025

Fixes #19274

When checking for conflicting members, track visited members by name.toString.
When checking for matching members, compare "target names" as simple names.

@som-snytt
Copy link
Contributor Author

The github issue number autocomplete has gone from mostly useless to quite glitchy for me.

@som-snytt
Copy link
Contributor Author

Edit: that tweak compares apples and oranges.

@som-snytt som-snytt force-pushed the issue/19274-conflicting-defs branch from 0cdc6ac to 8dc911b Compare December 7, 2025 09:25
@som-snytt
Copy link
Contributor Author

What is the behavior when the other method is from a superclass from the class path? Is its name also simple.

@som-snytt som-snytt force-pushed the issue/19274-conflicting-defs branch from 8dc911b to 605a439 Compare December 8, 2025 19:57
@som-snytt
Copy link
Contributor Author

som-snytt commented Dec 8, 2025

Is this just to defend against people using identifiers with dollars that happen to collide? Maybe this is too expensive to support, as it expensive in the happy path. Is it OK because name.toString is computed just once and is required eventually anyway? In that case, it should compare toString and not toSimpleName. (The hypothesis was that preferring comparisons with simple names would be cheaper on average, but that is untested. That is, toSimpleName is a no-op for simple names.)

@som-snytt som-snytt force-pushed the issue/19274-conflicting-defs branch from 605a439 to 01d038c Compare December 8, 2025 20:06
@som-snytt
Copy link
Contributor Author

som-snytt commented Dec 9, 2025

The CB a error is the izumi-reflect example. The double definition is detected now.

@som-snytt som-snytt marked this pull request as ready for review December 9, 2025 18:26
@Gedochao Gedochao requested a review from hamzaremmal December 10, 2025 10:04
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.

Compiler does not error when duplicate methods exist in generated bytecode

2 participants