Skip to content

Apply implicit conversion from derived Conversion instance defined as implicit rather than given #21785

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

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

prolativ
Copy link
Contributor

Fixes #21757

@prolativ prolativ requested a review from smarter October 16, 2024 14:01
@smarter smarter enabled auto-merge October 16, 2024 14:05
@prolativ
Copy link
Contributor Author

This seems to fix the problem, assuming usage of Conversion instances for implicit conversions is expected to work if the instance is defined as implicit def rather than given.
The specification https://docs.scala-lang.org/scala3/reference/contextual/conversions.html mentions only given instances but I assume this was intended to take implicit into account.
Anyway, this already works with implicit for simpler cases

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.

Conversion behave differently depending on if implicit def or given is used
3 participants