Files
sdk/pkg/analyzer/test/error
Danny Tuppeny a2fc9d8767 [analyzer] Improve locations for diagnostic context messages when no names
Previously -1 was used as the offset for unnamed elements when building diagnostics, but this is never a valid location (and for VS Code, results in the diagnostic not appearing at all, even if the invalid location is only in a context message).

With this change we use the offset of the fragment instead.

Fixes https://github.com/dart-lang/sdk/issues/62955.

Change-Id: I6aec9b7a9a6d49b151b1cf3eaea4b684486b6d8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/490121
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2026-03-25 13:13:30 -07:00
..