- Notifications
You must be signed in to change notification settings - Fork1.1k
Allow using clauses to introduce Scala-2 conversions#13662
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Notably, `(using A <:< B)` should introduce an implicit conversion.Previously that did not work since we tried to elaborate the contextparameter as a `scala.Conversion`.
dwijnand left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Unless I'm blind, this makes(using map: Map[String, Int]) a problem again. I think we should "just" special-case<:< (and thus its subclass=:=): I know it's a special-casing, but I see it as a retroactive definition of them as subclasses ofConversion. Perhaps it can even be special-cased that way: stickConversion as<:<'s base class or interfaces?
odersky commentedOct 4, 2021
No, we do require that the implicit candidate returns a |
dwijnand left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Ah, right. Thanks! Do we have or want to add a test to safe guard against that Map puzzler?
odersky commentedOct 4, 2021 via email
I think we do have a test. But I have not looked it up. …On Mon, Oct 4, 2021 at 10:08 AM Dale Wijnand ***@***.***> wrote: ***@***.**** approved this pull request. Ah, right. Thanks! Do we have or want to add a test to safe guard against that Map puzzler? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#13662 (review)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAGCKVVJFUPPUERXSO7WDJTUFFOGJANCNFSM5FHMAJYA> . Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>. -- Martin OderskyProfessor, Programming Methods Group (LAMP)Faculty IC, EPFLStation 14, Lausanne, Switzerland |
Notably,
(using A <:< B)should introduce an implicit conversion.Previously that did not work since we tried to elaborate the context
parameter as a
scala.Conversion.