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
Consider:
> trait A { def x = "foo" } > trait B { def x = 42 } > val AB = new A with B { override def x = super.x } > AB.x java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
I would expect the overriding method to be rejected, since it has type String and it is expected to be Int & String.
String
Int & String
The text was updated successfully, but these errors were encountered:
I will be working on this
Sorry, something went wrong.
@amanjpro there is already a fix at: #2768
Ah, thanks for informing me.
ea582a7
No branches or pull requests
Consider:
I would expect the overriding method to be rejected, since it has type
String
and it is expected to beInt & String
.The text was updated successfully, but these errors were encountered: