You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not a bug, but a syntax limitation by Groovy.
The Spock magic depends on the getting from your example two expression statements,closure || description and { 1 } || "case 1".
But the Groovy parser sees the "closure" not as stand-alone closure but as argument to the method description, so what it sees is one expression statement closure || description({ 1 }) || "case 1" and there is not much we can do about that.
What you as test author can do is using syntax tricks, like adding a dummy column
Issue description
Using closure as the first parameter in a parameterized feature/test generates:
How to reproduce
Closure as the second parameter works, so it's just a minor issue. Nevertheless, maybe it could be fixed without much effort.
Additional Environment information
Java/JDK
Groovy version
Build tool version
Occurs in both Gradle and Idea compilation.
The text was updated successfully, but these errors were encountered: