Details
Description
when trying to compile wicket-7 from HEAD it fails under OS X / JDK 1.8.0_11. Casting a NULL to generic type (T) solves the issues. This seems like some odd case of failing type inference.
The problematic source line is:
return getEnumImpl(key, eClass, null);
The compiler error is:
Error:(792, 35) java: incompatible types: inference variable T has incompatible upper bounds java.lang.Enum<T>,T
This will fix the issue:
return getEnumImpl(key, eClass, (T)null);
I found that there is a fix WICKET-5427 which does not work in most current JDK 1.8.0_11 anymore. -Could not change the wicket-6 branch since the change will break the clirr plugin (see -WICKET-5427).
Attachments
Issue Links
- is related to
-
WICKET-5427 Building Wicket with JDK 1.8 fails with signatures like <T extends Enum<T>>
- Resolved