assertFalse(((SpelNodeImpl)((SpelExpression)expression).getAST()).isCompilable());
}
@Test
public void functionReferenceVarargs_SPR12359() throws Exception {
StandardEvaluationContext context = new StandardEvaluationContext();
context.registerFunction("append",
SomeCompareMethod2.class.getDeclaredMethod("append", String[].class));
context.registerFunction("append2",
SomeCompareMethod2.class.getDeclaredMethod("append2", Object[].class));
context.registerFunction("append3",
SomeCompareMethod2.class.getDeclaredMethod("append3", String[].class));
context.registerFunction("append4",
SomeCompareMethod2.class.getDeclaredMethod("append4", String.class, String[].class));
context.registerFunction("appendChar",
SomeCompareMethod2.class.getDeclaredMethod("appendChar", char[].class));
context.registerFunction("sum",
SomeCompareMethod2.class.getDeclaredMethod("sum", int[].class));
context.registerFunction("sumDouble",
SomeCompareMethod2.class.getDeclaredMethod("sumDouble", double[].class));
context.registerFunction("sumFloat",
SomeCompareMethod2.class.getDeclaredMethod("sumFloat", float[].class));
context.setVariable("stringArray", new String[]{"x","y","z"});
context.setVariable("intArray", new int[]{5,6,9});
context.setVariable("doubleArray", new double[]{5.0d,6.0d,9.0d});
context.setVariable("floatArray", new float[]{5.0f,6.0f,9.0f});
expression = parser.parseExpression("#append('a','b','c')");
assertEquals("abc",expression.getValue(context).toString());
assertTrue(((SpelNodeImpl)((SpelExpression)expression).getAST()).isCompilable());
assertCanCompile(expression);