Closed
Description
Following simple example fails with an ArrayIndexOutOfBoundsException due to compiling with Eclipse Oxygen (jdk 1.8+):
public class A {
public static Object test(Object object, Object returnThis) {
return returnThis;
}
}
@ExtensionMethod(A.class)
class B {
public Object testExtensionMethod(Object object) {
return object.test(new Object());
}
}
Exception
Internal compiler error:
java.lang.ArrayIndexOutOfBoundsException
In Eclipse Neon it works!
Metadata
Metadata
Assignees
Labels
No labels
Activity
datomesan commentedon Oct 28, 2017
I have the same problem and Eclipse show that error
Internal compiler error: java.lang.ArrayIndexOutOfBoundsException: 1 at org.eclipse.jdt.internal.compiler.ast.MessageSend.analyseCode(MessageSend.java:182)
janaroj commentedon Feb 1, 2018
Having the same issue with Eclipse Oxygen:
java.lang.ArrayIndexOutOfBoundsException: 1
at org.eclipse.jdt.internal.compiler.ast.MessageSend.analyseCode(MessageSend.java:182)
mad-pojo commentedon Apr 17, 2018
I make a correction:
@ExtensionMethod
fails if there are exactly 2 parameters.Workaround: in the preferences "Java / Compiler / Errors/Warnings" switch the options "Unlikely argument type for collection methods using 'Object'" and "Unlikely argument type for method equals()" to "Ignore".
This feature will be ignored.