Regression in the javac 1.8u40
Rob McKenna
rob.mckenna at oracle.com
Mon Apr 20 16:03:46 UTC 2015
Probably better to discuss this on compiler-dev at openjdk.java.net
-Rob
On 20/04/15 16:33, Aaron Digulla wrote:
> Hello,
>
> I've found a regression in generics handling of Java 8. The code can be compiled and works fine with Java 6u45 and 7u75.
>
> Basically, I have an interface with this method:
>
> <T extends Bar<T>> T foo();
>
> where Bar is
>
> interface Bar<B extends Bar<B>> {}
>
> I can implement this method without problem
>
> @Override
> public <T extends Bar<T>> T foo() {
> return null;
> }
>
> but I can't override such a method anymore in Java 8:
>
> @Override
> public <T extends Bar<T>> T foo() {
> T result = super.foo();
> return result;
> }
>
>
> I've a small project which demonstrates the issue. I tried to open a bug but couldn't create a user in the bug database.
>
> What should I do, now?
>
> Regards,
>
More information about the compiler-dev
mailing list