We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The following code:
trait A[X] { type M } class B[X] trait C { def f[X](a: A[X]): B[a.M] } class D extends C { override def f[X](a: A[X]) = new B[a.M] }
fails to compile, with the confusing error message:
[ERROR] C:\Users\Michael\workspace\paperdoll\src\main\scala\com\github\m50d\paperdoll\effect\Eff.scala:9: error: type mismatch; [ERROR] found : B[a.M] [ERROR] required: B[a.M] [ERROR] override def f[X](a: A[X]) = new B[a.M]
As far as I can see this code should compile? If not then the error should be clearer.
The text was updated successfully, but these errors were encountered:
Imported From: https://issues.scala-lang.org/browse/SI-9701?orig=1 Reporter: Michael Donaghy (lmm) Affected Versions: 2.11.8
Sorry, something went wrong.
Michael Donaghy (lmm) said: Paul Phillips pointed out that one can work around this by specifying the return type of the overriding method explicitly.
@SethTisue said: compiles in 2.12.0-RC1
No branches or pull requests
The following code:
fails to compile, with the confusing error message:
As far as I can see this code should compile? If not then the error should be clearer.
The text was updated successfully, but these errors were encountered: