I’ve got a Kotlin codebase with Groovy/Spock tests...
# general-advice
r
I’ve got a Kotlin codebase with Groovy/Spock tests. This is mostly fine, except for calling Kotlin functions with named parameters, and
copy
methods on data classes from Groovy. Are there any nice ways to bridge between them? In an ideal world I suppose I’d translate from a Groovy invocation with a Map to named parameters. Perhaps a compiler plugin could overload methods with a version that takes a Map? Even better would be if Idea understood that the Map’s keys should correspond to the function’s parameter names!
Increasingly thinking that a Groovy global AST transformation is the way to do it.