We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
3.2.1
trait MyData object MyData: extension (m: MyData) def printIt() = println("hey from my data") enum MyTag[A]: case MyDataTag extends MyTag[MyData] def callExtension[A](tag: MyTag[A], a:A): Unit = tag match case MyTag.MyDataTag => a.printIt()
Compiler error:
value printIt is not a member of A, but could be made available as an extension method.
Should compile fine. If you annotate the type it does compile. I.e. (a: MyData).printIt() works like a charm. Maybe related to #16590 ?
(a: MyData).printIt()
https://scastie.scala-lang.org/xUDIWg9zSje6JqPNbkiuHg
The text was updated successfully, but these errors were encountered:
Thanks for the report and the clean minimization.
Maybe related to #16590 ?
That one looks tuple-specific, but after we fix this one, it'll be worth checking if that other one progresses.
Sorry, something went wrong.
after we fix this one, it'll be worth checking if that other one progresses
no change
SethTisue
dwijnand
Successfully merging a pull request may close this issue.
Compiler version
3.2.1
Minimized code
Output
Compiler error:
Expectation
Should compile fine. If you annotate the type it does compile. I.e.
(a: MyData).printIt()
works like a charm.Maybe related to #16590 ?
Scastie Link
https://scastie.scala-lang.org/xUDIWg9zSje6JqPNbkiuHg
The text was updated successfully, but these errors were encountered: