Compilation error of type mismatch for JDK 8 source in eclipse
I am trying to compile the original Java 1.8.0_45 (java. ** only) using the same JDK as the compiler in Eclipse Luna and get the following compilation error for the 1599 line of MethodHandleImpl.java:
Type mismatch: cannot convert from Class<? extends Object[]> to Class<? extends Object[]>
Violation line:
Class<? extends Object[]> objArrayType = arrayType.asSubclass(Object[].class);
Interestingly, compiling the same source from the command line throws no errors when used:
javac -sourcepath ./java -cp rt.jar @classes
where "classes" contains a list of classes to compile, including java / lang / invoke / MethodHandleImpl.java
I would like to know why eclipse is flagging this as a bug? Looking at eclipse type mismatch errors, the "from" and "to" types are the same!
source to share
No one has answered this question yet
Check out similar questions: