Skip to content

Inherited extension conflicts with local method even when signatures do not match #10495

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

Closed
edolgy opened this issue Nov 25, 2020 · 0 comments · Fixed by #10913
Closed

Inherited extension conflicts with local method even when signatures do not match #10495

edolgy opened this issue Nov 25, 2020 · 0 comments · Fixed by #10913
Assignees
Milestone

Comments

@edolgy
Copy link

edolgy commented Nov 25, 2020

class Foo:
  extension(x: String) def run: Unit  = ???

object Bar extends Foo:
  def run(v: Int): Unit = ???

  "ABC".run  // Fails:  Reference to run is ambiguous...

I believe it is introduced in M2

@edolgy edolgy changed the title Inherited extension conflicts with local method Inherited extension conflicts with local method even when signatures do not match Nov 26, 2020
odersky added a commit to dotty-staging/dotty that referenced this issue Dec 24, 2020
@Kordyjan Kordyjan added this to the 3.0.0 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants