Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
4.0.12
-
None
Description
Spreading a list inside brackets causes a SpreadExpression should not be visited here during class generation. (The business instance of this is trying to use a list of URL patterns for Spring antMatchers.)
@CompileStatic class Bug { public static final List<String> A = ['a1', 'a2'] static void varargs(String... strings) { println Arrays.toString(strings) } public static void main(String... args) { varargs([ *A ] as String[]) } }
Attachments
Issue Links
- is related to
-
GROOVY-10599 STC: support spread operator for list literals
- Closed
-
GROOVY-10597 STC: support spread arguments for varargs
- Closed
- relates to
-
GROOVY-11067 Add support for spread elements in array initializer
- Open