-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
type "leakage" with transparent methods on opaque types #20434
Comments
Possible duplicate: #20302 |
@tschuchortdev agree, that looks like the same problem |
Also see #13461 |
@soronpo it worries me a little this bug is 3 years old 😂 Is it fixable? If it's not something likely to be fixed in the near term, I will probably decide to deploy some alternative approaches that are less aesthetically pleasing but maintain proper typing |
I don't know the likeliness of it being fixed. I do wish we had more emphasis on stability in Scala 3. |
I just tried removing Since this is working for me, I'll close this issue, although it still seems like a typing problem if you really did need |
Compiler version
3.4.2-RC1
Minimized code
Output
The
*
method returns typeRepro & Int
, due totransparent
keyword. In other words, it leaks the implementation typeInt
Expectation
I need a way for transparent methods to return only
Repro
, notRepro & Int
, to prevent leaky abstraction of the opaque type.The text was updated successfully, but these errors were encountered: