Skip to content

analyzer-0.39.4 provides wrong contentsOffset/contentsEnd for string interpolationΒ #40495

@a14n

Description

@a14n

This shows up in dart-archive/linter#1996 visiting a StringInterpolation.

Here's the result of a simple case with "\'$f":

node:"\'$f"
node.offset:286
element:"\'
element.offset:286
element.contentsOffset:287   // OK
element.contentsEnd:288      // KO should be 289
element.end:289              // OK
element:"
element.offset:291           // OK
element.contentsOffset:292   // KO should be 291
element.contentsEnd:292      // KO should be 291
element.end:292              // OK

/cc @bwilkerson @stereotype441 @pq

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work onarea-dart-modelFor issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.dart-model-analyzer-packageIssues related to package:analyzertype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions