You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[java-interop] Compilation error "incompatible type in overriding" when inheriting from a Java subclass with different field type to parent class (regression in 2.13)
#11575
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.
At first I thought this might be an access thing, but it's not, it's a method-vs-field thing. Make the fields public, javac still accepts it. But make the fields into methods, and javac of course says counts() in Cover cannot override counts() in Base, regardless of whether they're public-access or default-access.
Yeah, looks like another victim of the stricter refchecks in scala/scala#7439.
We'll need to add a few exemptions in the logic for when we're dealing with Java pairs
Uh oh!
There was an error while loading. Please reload this page.
Minimal to reproduce:
Extending in Scala:
throws
incompatible type in overriding
in 2.13.0 (compiles for 2.10.7, 2.11.12, 2.12.7)The text was updated successfully, but these errors were encountered: