Fix bug with JavaMember Varargs invocation. Coerce the element type, not Array.

This commit is contained in:
Koushik Dutta
2018-12-17 02:15:00 -08:00
committed by yut23
parent 8a05f69f50
commit 42364df8be

View File

@@ -51,7 +51,7 @@ class JavaMember extends VarArgFunction {
fixedargs = new CoerceLuaToJava.Coercion[isvarargs? params.length-1: params.length];
for ( int i=0; i<fixedargs.length; i++ )
fixedargs[i] = CoerceLuaToJava.getCoercion( params[i] );
varargs = isvarargs? CoerceLuaToJava.getCoercion( params[params.length-1] ): null;
varargs = isvarargs? CoerceLuaToJava.getCoercion( params[params.length-1].getComponentType() ): null;
}
int score(Varargs args) {