spring-framework icon indicating copy to clipboard operation
spring-framework copied to clipboard

Support varargs invocations in SpEL for varargs array subtype in compiled expressions

Open LeMikaelF opened this issue 2 weeks ago • 2 comments

This PR adds support for varargs invocations where the varargs argument is an array with a component type that is a subtype of the parameter varargs component type. For example, the method accepts an Object... args parameter, and it is passed a String[] argument. https://github.com/spring-projects/spring-framework/pull/32704 already added support for this in interpreted expressions. There were a few tests that were commented out because compiled expressions didn't support this yet, so I uncommented them and added more tests for functions, methods, and constructors.

I will be happy to address any comments on this PR.

LeMikaelF avatar May 13 '24 01:05 LeMikaelF