Skip to content

Commit

Permalink
should check parameterType first, then valueType #464
Browse files Browse the repository at this point in the history
  • Loading branch information
walterxie committed Apr 29, 2024
1 parent 7393313 commit 78482fe
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ public static boolean matchingParameterTypes(List<Argument> arguments, Object[]

// this code only checks whether types are matching, the cast has to be inside the function or distribution.
// check if the type is an array, e.g. TimeTreeNode[].
if (valueType.isArray()) {
if (!parameterType.isArray())
if (parameterType.isArray()) {
if (!valueType.isArray())
return false; // invalid, if given type is array, but required parameter type is not array

Object[] arr = lightweight ? (Object[]) arg : (Object[]) ((Value) arg).value();
Expand Down

0 comments on commit 78482fe

Please sign in to comment.