Commit Graph

11620 Commits

Author SHA1 Message Date
Konstantin Shcheglov 8779d4e9a7 Breaking changes for analyzer version 14.0.0
Change-Id: I3bd6b1bbf60bb1b45f46e62ebf448f27f103f98e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509561
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-06-11 11:59:47 -07:00
Konstantin Shcheglov 4b10d3e1d3 CQ. Remove GatheringDiagnosticListener.
Change-Id: I1d45d3ea4bf0e556851bf943b95076c11158d9cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/511300
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-06-11 10:52:47 -07:00
Konstantin Shcheglov 47ba94ebea CQ. Switch ErrorReporterTest to simpler RecordingDiagnosticListener.
Change-Id: Iaf5a243ed0b35c369e254e5541448aab06c48b6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/511280
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-06-11 10:51:44 -07:00
Konstantin Shcheglov 4473de2a5d CQ. Use inline expected diagnostics in PubspecDiagnosticTest(s).
Change-Id: Id6f8305c0f5e92ee48cf9c0ac1adc5c2e3a2d490
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/511240
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-06-11 09:51:05 -07:00
Konstantin Shcheglov c3c2986b82 CQ. Remove low value test/src/lint/lint_rule_test.dart
These tests only checked that MultiAnalysisRule.reportAtNode / reportAtToken
forward the supplied DiagnosticCode into DiagnosticReporter.

Change-Id: Iade193431ab28ff4c2ac5f9f77874f1dd3c821cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/511200
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-06-11 08:59:53 -07:00
Konstantin Shcheglov 96c0be6601 CQ. Simplify LineInfoTest, stop using GatheringDiagnosticListener.
Change-Id: I7d859f80eb36b9d2e29ccdd013bcdc4c04ed8219
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/511141
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-06-11 08:55:58 -07:00
Konstantin Shcheglov d22b566c31 CQ. Migrate ManifestValidatorTest to inline expected diagnostics.
Change-Id: I499057965ea93aae9f550b9a383033ea6072db41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/511140
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-06-11 07:53:15 -07:00
Konstantin Shcheglov be4df1a869 API. Add Folder.getFile/Folder, deprecate getChildAssumingFile/Folder
This aligns names with ResourceProvider.getFile/Folder.

Change-Id: I30383ef1fa6f7cbe60b187338e25b8ca75806730
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/511120
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-06-11 07:46:21 -07:00
Konstantin Shcheglov 649a56d6e4 CQ. Switch analysis options tests to inline expected diagnostics.
Change-Id: I2c33dbd645bd8611836cbcbab597a23165d1fb9e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/511060
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-06-11 07:45:07 -07:00
Konstantin Shcheglov bf71251dcd CQ. Remove ResolutionTest.error/message, all goes through inline expected diagnostics now.
Change-Id: I46fd2efe14e1bb46fa7ec12423c19fcf551bdca9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510660
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-06-10 11:25:41 -07:00
Konstantin Shcheglov cb41c7b055 CQ. Remove assertErrorsInList().
Change-Id: I51afa9bce21992d6093935d303034551e135c94d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510500
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-06-10 11:25:01 -07:00
Konstantin Shcheglov 8267ce6fff CQ. Use more inline expected diagnostics.
Change-Id: I83743fee43718133df71dd33093056543dc83094
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510482
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-06-10 10:57:43 -07:00
Konstantin Shcheglov 6d86b39595 Fine. Store formal parameter default values separately from FunctionType(s).
A type is just a type, it should not attempt to carry element semantics.

Bug: https://github.com/dart-lang/sdk/issues/63555
Change-Id: I9dacc4f5cc4060d862f7e1bb1ececdd9dc1a303c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510420
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-06-10 10:29:28 -07:00
Konstantin Shcheglov 24cf34371a CQ. Stop using assertErrorsInList() in AnalysisDriverCachingTest.
Change-Id: Icac933eb6cfd61798a163daa906348f68b7c2616
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510441
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-06-10 09:57:10 -07:00
Jens Johansen abd32d5449 [analyzer] Fix _OverlayFile.writeAsBytesSync
Change-Id: I3b4d7ad2b7a781c49abebef307a44dd9b3381b37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510361
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2026-06-10 01:08:18 -07:00
Konstantin Shcheglov f8d286d4d2 CQ. Migrate from assertInvalidTestCode() to resolveTestCodeWithDiagnostics() and remove it.
Change-Id: Id1306cef4434ee4f61fa3df8a33aa4009698203f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510189
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-06-09 12:34:43 -07:00
Konstantin Shcheglov a7c437e4d8 CQ. Remove SdkConstraintVerifierTest, assertErrorsInCode()
Change-Id: I563d661c70faa6c3cedf64df442f06aa688864c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510186
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-06-09 12:26:39 -07:00
Konstantin Shcheglov e15ccdd9be CQ. Remove not useful PubSuggestionCodeTest, tweak for encoding test.
Change-Id: I08f5da69db285395566e71463e4e357ea4227ac2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510201
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-06-09 10:48:56 -07:00
Konstantin Shcheglov ea50ec6486 API. Deprecate FormalParameterElement.formalParameters and typeParameters.
For clients outside the library the useful property in
`FormalParameterElement.type`, not *how* this type was specified
syntactically: `void f(int a<T>())` vs. `void f(int Function<T>() a)`.
This way, we have to think about these type parameters and formal
parameters only locally, like for example about local variables - they
exist, enclosed in a fragment, but don't leak outside into the element
model of a method.

I found this while working on the augmentations: that formal parameters
have to have the same types in the introductory declaration, and in
augmentations.

Change-Id: Ie4e92ebd0cd0204c4ba80200a9497e95859cc3e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509522
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-06-09 09:51:14 -07:00
Konstantin Shcheglov 55dcbad483 Augment. Hide augmentation recovery elements from signatures
Do not expose recovery type parameter and formal parameter elements
through the public element model. Recovery fragments are still needed
internally to link augmentation chains with mismatched shapes, but they
should not change the effective arity or callable signature of the
declaration being augmented.

Filter fragments marked as originating from another enclosing fragment
when computing executable formal parameters, executable type parameters,
and instance type parameters. This keeps function types, class arity,
and constructor or method signatures based on the real declaration
rather than on synthetic recovery elements introduced for invalid
augmentations.

Change-Id: I455a8a18bc07cdae30006754e069d687659aab1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510182
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-06-09 09:34:12 -07:00
Konstantin Shcheglov b6785856fe CQ. Remove stale tests.
These are either ancient syntax, or are about Object and actually not
checked, and there is no reason to check.

Change-Id: I5869aeea4012c6dee0bc158337eecf02e479c365
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510200
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-06-09 09:31:01 -07:00
Konstantin Shcheglov 3a85655f91 CQ. Migrate more tests from assertErrorsInCode().
Move another batch of analyzer tests away from offset-based
assertErrorsInCode() expectations. Put expected diagnostics and context
messages directly in the source snippets instead, including multi-file
cases that need context markers in supporting files.

This keeps each diagnostic expectation next to the code that produces
it, making the tests easier to read and less fragile when surrounding
code changes. It also removes now-unused diagnostic imports and helper
parameters that were only needed for explicit ExpectedDiagnostic lists.

Update the diagnostic expectation utilities so stripping generated
marker lines preserves the retained source lines correctly.

Change-Id: Ibe3890b9ff5e2b2e102e13e5ecc243bdf80c5f4b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509682
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-06-08 13:47:41 -07:00
Konstantin Shcheglov a4ced20e50 CQ. Simplify WrongNumberOfParametersForOperatorTest.
Change-Id: Id2c4736ea41c821c40c6ef9f4abc46409487f745
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509600
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-06-08 09:09:29 -07:00
Konstantin Shcheglov a6d53d7aaa CQ. Align UseOfVoidResultTest names with analyzer AST.
PS5: only renames.
PS7: sort

Change-Id: I32e0820dc776c54b2146f32a2537a1c758ef3b7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509820
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-06-08 08:41:43 -07:00
Konstantin Shcheglov 83c245288c Augment. Remove unecessary test_isComplete_ tests.
This property is already heavily tested by existing tests.

Change-Id: I84a2f0ff1c56d77f2e5ee66c18aa9df0f93a3e14
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509800
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-06-08 08:40:30 -07:00
Konstantin Shcheglov a21f54e771 CQ. Migrate remaining parser tests from parseStringWithErrors() and remove it.
Change-Id: I12f74a0222a2e066f27862898e1ed091f99e154c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509563
Reviewed-by: Paul Berry <paulberry@google.com>
2026-06-05 18:04:24 -07:00
Konstantin Shcheglov 778a860a2a Add ElementAnnotation.isValidAtElement()
Bug: https://github.com/dart-lang/sdk/issues/63503
Change-Id: Iadc096c244607edcb773d70338f1b5b769c25128
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509560
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2026-06-05 18:02:28 -07:00
Konstantin Shcheglov 9a769de4b7 DeCo. Only regular formal parameters can be defining.
Bug: https://github.com/dart-lang/sdk/issues/63529
Change-Id: I5d9b0862d52e3d01dd15f1eb9845baad45fa0104
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509542
Reviewed-by: Paul Berry <paulberry@google.com>
2026-06-05 17:59:36 -07:00
Sam Rawlins 4c6fe56ae3 linter: Introduce no_raw_types replacing strict-raw-types
Work towards https://github.com/dart-lang/sdk/issues/63516

I have code here to deprecate the `analyzer/language/strict-raw-types`
setting. But I disabled it, as I realized we first need to ship an SDK
to Flutter that offers the lint rule, before we deprecate the setting,
which will cause CI to fail (like a Dart->Flutter roll).

When the deprecation is enabled, we can also ship the automated fix.

Change-Id: I17d1ea9aba96063059e37891c05d4a8bd3f02737
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509063
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2026-06-04 14:12:28 -07:00
Konstantin Shcheglov 4da9a9133e Augment. Report augmentationPositionalFormalParameterName.
PS1: rename the test file.

Change-Id: I0e38a25c9c6d2b573766eb9a088fadbc8a4fc5b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509202
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-06-04 12:52:55 -07:00
Konstantin Shcheglov 43f3a50349 CQ. Replace _evaluateConstant() with _topLevelVar().
So that we don't have to repeat manually what already happens in
the element model.

Change-Id: I31cdfb98d316641496c017d7ac70e5be5d5d5853
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509163
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2026-06-04 09:57:00 -07:00
Konstantin Shcheglov f9f9023516 Augment. Report positional / optional / named formal parameters shape mismatch.
Change-Id: Ia218cc02024a0a12f35a9c8fdba8b1e65f691244
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509161
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-06-04 08:50:36 -07:00
Konstantin Shcheglov 9c69609406 Augment. Rename ExecutableFragmentImpl.isCompleteDeclaration to isComplete.
Change-Id: I47d70e93da6e16e4019d61cf62533aba7818b7c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509140
Reviewed-by: Paul Berry <paulberry@google.com>
2026-06-03 18:05:12 -07:00
Konstantin Shcheglov d54a54d976 Augment. Rename FragmentImpl.isCompleteDeclaration to isComplete, text only.
Change-Id: I12bbec91d0498ba4a2cc428e3a2321875fcdba5c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509101
Reviewed-by: Paul Berry <paulberry@google.com>
2026-06-03 18:03:42 -07:00
Sam Rawlins 5a94256582 meta: Introduce TargetKind.importDirective
Fixes https://github.com/dart-lang/sdk/issues/63467

Change-Id: I02f048405878d9ca578f8cbea318c59697f2811b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509021
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2026-06-03 13:34:57 -07:00
Konstantin Shcheglov 22f451c4ac CQ. Use assertDartObjectText() with raw multi-line string in more places.
Replace ad hoc assertions over DartObjectImpl with
assertDartObjectText() in constant evaluation and resolution tests. This
makes the expected constant value shape explicit, including invalid
results, variables, constructor invocations, type arguments, and
superclass fields, instead of checking only selected fields.

Use raw multi-line strings for these expectations so expected text can
be copied and maintained consistently without escaping interpolation or
other Dart string syntax.

Remove the now-unused null assertion helper and analyzer implementation
imports that were only needed by the direct assertions.

Change-Id: Ib734c1d428dd69104403484534b60af918944d13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508705
Reviewed-by: Paul Berry <paulberry@google.com>
2026-06-03 11:13:59 -07:00
Konstantin Shcheglov f8ef9fdb61 Patterns. Fix for parsing nested pattern assigment: 'v2 = (v1) = 0'.
Change-Id: I4b3460dd57834eb52b4703c983ca6f8ed60fe270
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508684
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-06-03 08:52:55 -07:00
Konstantin Shcheglov d8fab3228b Augment. Support for function-typed formal parameters in augmentations.
Change-Id: I665810aaeeb96dceb0045c98d426493a0fc75892
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/507960
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-06-02 12:24:36 -07:00
Konstantin Shcheglov 73d499369a Augment. Report defaultValueAlreadySpecifiedInAugmentationChain.
Change-Id: I0e12de28aea3f767bcd6e5f36a61c544c69e102b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/507880
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-06-02 12:12:20 -07:00
Konstantin Shcheglov 54ea451b36 CQ. Migrate more tests from parseStringWithErrors() to parseTestCodeWithDiagnostics().
Change-Id: Ifa7b7302fb6c059cf628f06d519f8391b510427c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508370
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-06-02 12:08:10 -07:00
Konstantin Shcheglov 33d4f1dff7 CQ. Migrate ToSourceVisitorTest from parseStringWithErrors() to parseTestCodeWithDiagnostics()
Change-Id: I902b4162f68acb2c220a2ee8c4ab8bcc47e3a3f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508423
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-06-02 12:03:14 -07:00
Konstantin Shcheglov 68b3e3c9a0 Augment. Remove a few 'abstract' modifiers from classes.
These were previously added because the parser did not support
abstract fields without diagnostics, IIRC.

Change-Id: Iba654bbfba3828e9823a65cc2b28f11a9ae0144a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508441
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-06-02 11:58:59 -07:00
Konstantin Shcheglov 856afa7248 CQ. Fix superclassName value for constConstructorWithNonConstSuper.
Change-Id: Ib90558dfabf72b2a3743dc06b6bc4886eb65fbba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508442
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-06-02 11:57:55 -07:00
Konstantin Shcheglov 2cc79a0fec Augment. Report modifierOutOfOrder for 'abstract static' field.
Change-Id: I6e25f204708ed6031e4004464205b5b173253e81
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508373
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-06-02 11:55:23 -07:00
Konstantin Shcheglov b389e23feb CQ. In DartObjectPrinter print full types of List, Set, Map values. Switch more tests to assertDartObjectText().
Change-Id: I66e078e571e9a5e803aed60911b519fe09d1ce7a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508440
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-06-02 10:55:35 -07:00
Konstantin Shcheglov fe53326c60 Augment. Report augmentsConstantVariable and constantVariableAugmentation.
Change-Id: I19f2d7c4771a88e8b03599d386ef9d62a26e80e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/507840
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-06-02 10:29:14 -07:00
Konstantin Shcheglov fb2c014693 CQ. Improvements to indexing and search around DirectSubtypeWithMembers.
Separate the subtype search entry points by result shape and caller
intent. Use `directSubtypeReferences` for reference locations in subtype
clauses, and use `directSubtypesWithMembersOfType` /
`directSubtypesWithMembersOfSubtype` for indexed direct subtypes with
their declared instance members.

Rename `SubtypeResult` to `DirectSubtypeWithMembers` so the model
matches what the search result actually represents. Update the server
member-collection logic to start from direct subtypes of the target type
and then walk direct subtypes by subtype id.

Introduce `SubtypeIndexElementId` as the single representation of
subtype index ids. This keeps id construction consistent between index
building and search, preserves the declaration file for declarations in
parts, and still exposes the element name separately for file-state
prefiltering.

Also make the subtype index expectations text-based so the expected
supertype id, subtype name, and member list are easier to read and
update.

Change-Id: Ice71d9b116aca83372bf595f6e58a8ce4aa9e9d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/507780
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2026-06-02 10:28:16 -07:00
Konstantin Shcheglov 164cfda948 CQ. Migrate ast_test to parseTestCodeWithDiagnostics and findNode.
Replace the local marker-based _AstTest helper in ast_test.dart with
ParserDiagnosticsTest parsing and the shared findNode utilities. This
keeps the tests aligned with the inline diagnostics style used by other
parser tests, and avoids a second way to locate AST nodes from marked
source snippets.

Update the affected tests to parse normal source text, then locate the
expected node through findNode single-node accessors. Add a
singleConstructorName accessor so constructor-name tests can use the
same shared lookup path.

Change-Id: Ib8c7c2e7c2c1b320c95810ce148b5a27e68dda43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508421
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-06-02 09:21:45 -07:00
Sam Rawlins f91c6ba493 DAS plugins: Do not report the "dependency_overrides" section as illegal
Change-Id: Ib7c3f88569172821c04bce96c1fcae4aa13e05c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508372
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2026-06-01 18:46:52 -07:00
Sam Rawlins 02ecbc8cf2 Report and offer fix for wildcard stack trace variable
Fixes https://github.com/dart-lang/sdk/issues/55738

Turns out there are many unused StackTrace variables here and there in
our tests, so those are ignored in a few files.

Change-Id: Iff9d0db265b96aca608261cb4518b372255d19cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/501223
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-06-01 15:55:44 -07:00