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 #11318: add regression tests #11882

Merged
merged 1 commit into from
Jul 16, 2021
Merged

Conversation

anatoliykmetyuk
Copy link
Contributor

@anatoliykmetyuk anatoliykmetyuk commented Mar 24, 2021

No description provided.

Copy link
Member

@smarter smarter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem does not seem to be specific to polymorphic functions, it happens any time there's a class instance between the call and the extension method:

extension(a: Int)
  def b: Int = ???
  def h: Unit =
    new Function1[Int, Int] {
      def apply(r: Int): Int = b
    }

@anatoliykmetyuk anatoliykmetyuk changed the title Fix #11318: properly detect enclosing extension methods from a polyfunction Fix #11318: add regression tests Jul 16, 2021
@anatoliykmetyuk
Copy link
Contributor Author

Fixed by #13078.

@smarter smarter merged commit 20e2b95 into scala:master Jul 16, 2021
@smarter smarter deleted the i11318-clean branch July 16, 2021 12:44
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.

Assertion failed when not adding prefix to extension method in method body
2 participants