A compilation error occurs when using static compilation and attempting to assign the result of a method that returns a parameterized argument that contains an array in the type parameter. The equivalent Java code has no issues.
Here is a specific example:
The error returned is:
The expected behavior is that this code would compile and run successfully with @CompileStatic enabled.
Note that equivalent code with a non-array generic parameter works just fine:
Additionally, there is no compilation issue if the value is cast:
For some context, I'm running into this issue when working with jOOQ, as some of its API involves working with array type parameters.