Changeset 15234
- Timestamp:
- 02/09/20 13:03:52 (3 years ago)
- Location:
- trunk/abcl/src/org/armedbear/lisp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/Java.java
r15233 r15234 471 471 } 472 472 m.setAccessible(true); 473 Object result = m.invoke(null, methodArgs); 473 Object result = null; 474 if (!m.isVarArgs()) { 475 result = m.invoke(null, methodArgs); 476 } else { 477 result = m.invoke(null, (Object)methodArgs); 478 } 474 479 return JavaObject.getInstance(result, translate, m.getReturnType()); 475 480 } … … 1065 1070 } else if (Float.class.equals(from)) { 1066 1071 return Double.class.equals(to); 1072 } else if (from.isArray() && to.isArray()) { 1073 // for now just indicate that anything is assignable to an 1074 // java.lang.Object[], as this is the most common case 1075 if (to.getComponentType().equals(java.lang.Object.class)) { 1076 return true; 1077 } 1067 1078 } 1068 1079 return false; -
trunk/abcl/src/org/armedbear/lisp/JavaObject.java
r15228 r15234 289 289 // representations. 290 290 return obj; 291 } else if (c.isArray() && obj.getClass().isArray()) { 292 // ??? only supports conversions to java.lang.Object[] 293 // && c.getComponentType().equals(obj.getClass().getComponentType())) { 294 295 return obj; 291 296 } else { 292 297 return error(new TypeError(intendedClass.getName() + " is not assignable to " + c.getName()));
Note: See TracChangeset
for help on using the changeset viewer.