Files
Konstantin Shcheglov f18e8c0d1b DeCo. Stop using final / var, or opt-out from primary constructors.
Primary constructors repurpose `var`/`final` in formal parameter lists
as declaring parameters, which makes many older snippets erroneous.

Update tests to avoid these keywords unless they are the subject under
test:

- Remove redundant `var` from untyped formal parameters across analyzer,
  analysis_server, and linter tests (e.g., `f(var x)` -> `f(x)`), and rename affected tests from “...Var” to “...Untyped” where appropriate.
- Add `// @dart = 3.10` to test snippets and documentation examples that
  intentionally use legacy `final`/`var` constructor parameters so they remain parsed and analyzed under the pre-DeCo language version.
- Adjust expected diagnostic offsets and resolved-node expectations where code changed due to keyword removal or inserted language-version markers.
- Update mock SDK declarations to avoid `var` in parameter positions.

Change-Id: Ic0a2b129cda75d542f8229bc65b44bf6ad26ae22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/475180
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-01-23 09:22:59 -08:00
..