Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Overcome Name comparison hurdles#24691

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
som-snytt wants to merge1 commit intoscala:main
base:main
Choose a base branch
Loading
fromsom-snytt:issue/19274-conflicting-defs

Conversation

@som-snytt
Copy link
Contributor

@som-snyttsom-snytt commentedDec 7, 2025
edited
Loading

Fixes#19274

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

@som-snytt
Copy link
ContributorAuthor

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

@som-snytt
Copy link
ContributorAuthor

Edit: that tweak compares apples and oranges.

@som-snyttsom-snyttforce-pushed theissue/19274-conflicting-defs branch from0cdc6ac to8dc911bCompareDecember 7, 2025 09:25
@som-snytt
Copy link
ContributorAuthor

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

@som-snyttsom-snyttforce-pushed theissue/19274-conflicting-defs branch from8dc911b to605a439CompareDecember 8, 2025 19:57
@som-snytt
Copy link
ContributorAuthor

som-snytt commentedDec 8, 2025
edited
Loading

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-snyttsom-snyttforce-pushed theissue/19274-conflicting-defs branch from605a439 to01d038cCompareDecember 8, 2025 20:06
@som-snytt
Copy link
ContributorAuthor

som-snytt commentedDec 9, 2025
edited
Loading

The CBa error is theizumi-reflect example. The double definition is detected now.

@som-snyttsom-snytt marked this pull request as ready for reviewDecember 9, 2025 18:26
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@hamzaremmalhamzaremmalAwaiting requested review from hamzaremmal

At least 1 approving review is required to merge this pull request.

Assignees

@hamzaremmalhamzaremmal

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Compiler does not error when duplicate methods exist in generated bytecode

2 participants

@som-snytt@hamzaremmal

[8]ページ先頭

©2009-2025 Movatter.jp