Kotlin 2.2 multi-dollar string interpolation ($$"...") causes a parse error when used as an annotation argument.
Failing code:
@Scheduled(
fixedDelayString = $$"${app.interval:PT59M}",
initialDelayString = $$"${app.interval:PT59M}",
)
fun execute() { }
Error: ParseException / token recognition errors in the ANTLR lexer — the $$ prefix is not recognized.
This is a new occurrence of the gap reported in #6003 (multi-dollar interpolation in general). The specific case here is inside annotation argument lists.
Tested with PMD on main (7.25.0-SNAPSHOT).
Kotlin 2.2 multi-dollar string interpolation ($$"...") causes a parse error when used as an annotation argument.
Failing code:
@Scheduled( fixedDelayString = $$"${app.interval:PT59M}", initialDelayString = $$"${app.interval:PT59M}", ) fun execute() { }Error:
ParseException/ token recognition errors in the ANTLR lexer — the$$prefix is not recognized.This is a new occurrence of the gap reported in #6003 (multi-dollar interpolation in general). The specific case here is inside annotation argument lists.
Tested with PMD on
main(7.25.0-SNAPSHOT).