-
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
Missing requirement: self type does not conform to self type A #2214
Comments
Blocked by scala/scala3#2214
What is the recommended migration path for code like |
@olafurpg Let's worry about this if we see several errors of this type. For know I am hoping this is quite a rare case. |
@olafurpg I think you should be able to replace |
For what it's worth: I'm not sure I understand https://github.com/lampepfl/dotty/pull/702/files#diff-ca3386647f5386b6f70e99f1a9e188cdR3196, but certainly the error "missing requirement" is misleading. |
- Rewrite `apply = parse _` to `apply(x: Any) = parse(x)`: scala/scala3#2994 - Remove self type: scala/scala3#2214
- Rewrite `apply = parse _` to `apply(x: Any) = parse(x)`: scala/scala3#2994 - Remove self type: scala/scala3#2214
- Rewrite `apply = parse _` to `apply(x: Any) = parse(x)`: scala/scala3#2994 - Remove self type: scala/scala3#2214
- Rewrite `apply = parse _` to `apply(x: Any) = parse(x)`: scala/scala3#2994 - Remove self type: scala/scala3#2214
- Rewrite `apply = parse _` to `apply(x: Any) = parse(x)`: scala/scala3#2994 - Remove self type: scala/scala3#2214
A simpler example that Scala 2 accepts but 3 does not came up on Gitter yesterday: trait A
trait B { self: A => }
trait C { self: B => } |
That's the example in 1754995 (in reverse line order and alphabet letter order) so I take it as expected and intentional. |
The following code snippet compiles with scalac but not with dotc
Dotty reports the error message
Removing the
self: Quantity[_]
annotation onTimeDerivative
removes the error, and makes the rest of thesquants
project compile with Dotty 🎉The text was updated successfully, but these errors were encountered: