hfhbd
06/26/2022, 6:15 PMCodeBlock.of("${CodeBlock.of("foo")}.bar")
? This calls CodeBlock.toString()
and results into wrong imports. You must use CodeBlock.of("%L.bar", CodeBlock.of("foo"))
to keep the arguments of the inner CodeBlock.Paul Woitaschek
06/26/2022, 6:37 PMhfhbd
06/26/2022, 7:01 PMPaul Woitaschek
06/26/2022, 7:15 PMGrégory Lureau
06/27/2022, 7:47 AM"val t: %T".toFormatString(customType) +
" = %M()".toFormatString(methodRef) + ...
The transformation in code blocks is only done in the end, so I presume it saves me for this burden. And to ensure I'm not using toString(), I throw an error from the toString method 🙂hfhbd
06/27/2022, 7:53 AMtoString(): Nothing
too?Grégory Lureau
06/27/2022, 7:54 AM