Files
sdk/pkg/analysis_server
Kallen Tu adb68f4bb0 [analyzer] Provide better errors for invalid .length access in const expressions.
Add a new error message `CONST_EVAL_PROPERTY_ACCESS` for when we try to get 'length' on anything that's not a `String`.

This adds more specific errors for string length that would've went to the catch-all error at the end of `_getConstantValue` before. It should be more clear now what the error is.

Fixes https://github.com/dart-lang/sdk/issues/47273, https://github.com/dart-lang/sdk/issues/52833

Bug: https://github.com/dart-lang/sdk/issues/52833, https://github.com/dart-lang/sdk/issues/47273
Change-Id: I1f5daed82be00c6a8ecd43384d7ff9e59219cbb4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/319160
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-08-11 20:08:31 +00:00
..

analysis_server

A long-running process that provides analysis results to other tools.

The analysis server is designed to provide on-going analysis of one or more code bases as those code bases are changing.

Using the server

The analysis server is not intended to be used stand-alone, and therefore does not have a human-friendly user interface.

Clients (typically tools, such as an editor) are expected to run the analysis server in a separate process and communicate with it using a JSON protocol. The original protocol is specified in the file analysis_server/doc/api.html and Language Server Protocol support is documented in tool/lsp_spec/README.md.

Features and bugs

Please file feature requests and bugs at the issue tracker.