GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [kotlin] Multi-dollar interpolation parse error in annotations · Issue #6648 · pmd/pmd

[kotlin] Multi-dollar interpolation parse error in annotations #6648

New issue
Copy link
New issue
Copy link
Closed
#6653
Closed
[kotlin] Multi-dollar interpolation parse error in annotations#6648
#6653
Copy link
Labels
a:bugPMD crashes or fails to analyse a file.in:grammarAbout the grammar of a lexer or parser, eg, a parse/lex exception
Milestone
7.25.0

Description

@stokpop
stokpop
opened on May 7, 2026
Issue body actions

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).

Activity

  1. joacogonz32 commented on May 7, 2026

    @joacogonz32
    joacogonz32
    on May 7, 2026
    More actions

    hello, id like to work on this issue

  2. stokpop commented on May 7, 2026

    @stokpop
    stokpop
    on May 7, 2026
    ContributorAuthor
    More actions

    Note: with the fix from #6608, two distinct behaviors depending on context:

    In a function call argument (clazz($$"java.util.Collections$SingletonList")):
    Lexer-level errors only — parsing continues best-effort:

    [WARN] Syntax error at src/main/kotlin/Foo.kt:27:16: token recognition error at: '$'
    

    In an annotation argument (@Scheduled(fixedDelayString = $$"${app.interval:PT59M}")):
    Parser-level error — ParseException thrown, file reported as ProcessingError, exit code 5:

    [WARN] Syntax error at src/main/kotlin/Foo.kt:5:13: extraneous input '{' expecting ...
    src/main/kotlin/Foo.kt  -  ParseException: Parse exception in file ...
    

    Both cases require updating the ANTLR grammar to properly support $$ string interpolation (related to #6003).

  3. stokpop commented on May 7, 2026

    @stokpop
    stokpop
    on May 7, 2026
    ContributorAuthor
    More actions

    @joacogonz32 thanks, but I am working on a PR already

  4. adangel
    added
    a:bugPMD crashes or fails to analyse a file.
    in:grammarAbout the grammar of a lexer or parser, eg, a parse/lex exception
    on May 8, 2026
  5. adangel
    added this to the 7.25.0 milestone on May 8, 2026
  6. adangel
    added 2 commits that reference this issue on May 8, 2026

    fix(kotlin): support multi-dollar string interpolation (KEEP-375, iss…

    15823d2

    [doc] Update release notes (#6648, #6653)

    fa762bb
  7. adangel
    closed this as completedin ec446beon May 8, 2026
  8. adangel
    added a commit that references this issue on May 8, 2026

    [kotlin] Fix pmd#6648: Multi-dollar interpolation for regular strings (…

    This issue will close once commit ec446be is merged into the 'main' branch.
    ec446be
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a:bugPMD crashes or fails to analyse a file.in:grammarAbout the grammar of a lexer or parser, eg, a parse/lex exception

    Type

    No type

    Projects

    No projects

      Milestone

      • 7.25.0

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.