Skip to content

Add note to missing implicit arg of extension#26150

Draft
som-snytt wants to merge 1 commit into
scala:mainfrom
som-snytt:issue/23272-addendum-extension-context-bound
Draft

Add note to missing implicit arg of extension#26150
som-snytt wants to merge 1 commit into
scala:mainfrom
som-snytt:issue/23272-addendum-extension-context-bound

Conversation

@som-snytt
Copy link
Copy Markdown
Contributor

Detect extension [A: F](x: A) def f()
as distinct from extension [A](x: A)(using F[A]) def f() where the first form has a trailing implicit,
so that the extension is selected but fails to typecheck, and other conversions are not tried.

Fixes #23272

How much have you relied on LLM-based tools in this contribution?

Not at all

How was the solution tested?

New automated tests (including the issue's reproducer, if applicable)

Detect `extension [A: F](x: A) def f()`
as distinct from `extension [A](x: A)(using F[A]) def f()`
where the first form has a trailing implicit,
so that the extension is selected but fails to typecheck,
and other conversions are not tried.
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.

Code does not compile when using T as v instead of using v: T

1 participant