private static boolean isDynamicTypedExpression(Expression leftExpression) {
    if (leftExpression instanceof VariableExpression) {
      return  ((VariableExpression) leftExpression).isDynamicTyped();
    }
    if (leftExpression instanceof FieldExpression) {
      return  ((FieldExpression) leftExpression).isDynamicTyped();
    }
    if (leftExpression instanceof PropertyExpression) {
      return  ((PropertyExpression) leftExpression).isDynamic();
    }
    return false;
  }
Turns an argument list obtained from AstUtil.getArguments() into an Object[] array
suitable to be passed to InvokerHelper or SpockRuntime. The main challenge is
to handle SpreadExpression's correctly.
spock-core/src/main/java/org/spockframework/compiler/AstUtil.java