CLOVIS
07/27/2025, 6:11 PMval foo = "\$foo" // Warning: add interpolation prefix
println("""
foo: $foo
""".trimIndent())
Let's follow the warning. We get:
val foo = $$"$foo"
println("""
foo: $foo
""".trimIndent())
So far, so good. But now, the variable is pointless. Let's inline it, we get:
println("""
foo: $foo // doesn't compile
""".trimIndent())
Sometimes, it does actually inline it into:
println("""
foo: ${$$"$foo"}
""".trimIndent())
which was probably not the intent behind the KEEP. There is no inspection there to add an interpolation prefix.
There is also no inspection for:
println("""
foo: ${"\$foo"}
""".trimIndent())
Code highlighting frequently gets it wrong (e.g. see attached screenshot).
In the end, I'm pretty much did the entire migration manually.
Especially now that the team is proposing changing existing syntax in every other KEEP, I'm worried that tooling is being left off as an afterthought.Ben Woodworth
07/28/2025, 3:04 AMCLOVIS
07/28/2025, 5:56 PM$$"""<cursor>
followed by ENTER does not insert the .trimIndent()
and does not indent correctlyCLOVIS
07/28/2025, 5:57 PM