Commit Graph

12434 Commits

Author SHA1 Message Date
Kallen Tu ab217c355f [analyzer/cfe] Add an experiment flag for sealed class.
Have a separate flag from patterns, even though sealed families are to be shipped with patterns -- keep the work separate for now.

Change-Id: Ic3996b81d9a61f2a3b1e5137e7cc32ecc8bdec9e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267289
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2022-11-05 00:20:50 +00:00
Mateus Felipe C. C. Pinto 82143e6c95 [analyzer][meta] Refactor TargetKind to be a class, add a value in TargetKind to represent type parameter
Bug: https://github.com/dart-lang/sdk/issues/49796
Change-Id: Ide144ceb57bae94a71b9d1a7ec841d03363fc121
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258200
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-11-04 23:38:40 +00:00
Brian Wilkerson ca7ab1e89d Add documentation on tokens
This was written in response to a question from a contributor.

Change-Id: If689b1a22ac00a6a5a14cc09f47054a88baa4347
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268101
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-11-04 22:20:49 +00:00
Konstantin Shcheglov 303d907237 Add Pattern type variable to TypeAnalyzer.
Change-Id: I3d88b0337689efecffac228c9acf03a5a52229d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267461
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-11-04 19:23:37 +00:00
pq eff76309dc validate pubspec screenshot paths
See: https://github.com/dart-lang/sdk/issues/50179

Change-Id: I589809f17d45adfc6f1e3850d2109e58ec47af13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2022-11-03 20:44:48 +00:00
Konstantin Shcheglov d27d206108 Add analyzeRecordPattern() to the shared TypeAnalyzer.
Change-Id: I10e582a32f60db8bba8acf1f9cc8578469c51f77
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267442
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-11-02 21:06:33 +00:00
Konstantin Shcheglov 45fb04020d Merge TypeOperations2 into TypeOperations.
Change-Id: I957192cc72385f70cdd038a2e38b4ca4a0606bb7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266804
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2022-11-02 14:11:28 +00:00
Johnni Winther 5baa4af7d8 [analyzer,cfe] Add 'views' feature and support for 'view class'
This adds the 'views' feature flag together with parser support
for 'view class'. If the feature is not enabled, an error is reported.

TEST=pkg/front_end/parser_testcases/views/...

Change-Id: I813ac86a0e7de9f0a5729c6d7ae35b82d1258ae5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265780
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2022-11-02 11:09:59 +00:00
Konstantin Shcheglov bf9a9a7abd Add analyzeRelationalPattern() to the shared TypeAnalyzer.
Not sure if this is has much value in comparison to the existed
implementation in the analyzer.

We also have private implementations for extractor and record
patterns in the analyzer. I don't know yet for sure how (if) we will
share these, but if we do, it might be something like this one.

Change-Id: I86070bcf922a58fbf1087c7ab42c6eb5695c1475
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266861
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2022-11-01 22:56:25 +00:00
Konstantin Shcheglov 88f5b4816d Push all options for elements textual dump into ElementTextConfiguration.
Change-Id: Iff23553c00ed2d9870ee7507990751c4ac9d0bd8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266867
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-11-01 20:08:07 +00:00
Konstantin Shcheglov 2d58f3f61c Use XyzImpl in NodeListImpl type arguments.
Change-Id: I939dde44288dba1505356a44f4f41f4a5b83dfd6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266868
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-11-01 19:22:08 +00:00
Konstantin Shcheglov d68d1fff0d Remove the partial 'extension types' implementation from analyzer.
https://github.com/dart-lang/language/blob/master/working/1426-extension-types/feature-specification.md
was abandoned.

https://github.com/dart-lang/language/blob/master/working/1426-extension-types/feature-specification-views.md
is the new specification for a similar feature.

Change-Id: Ibacce3529e578c554059266bc4b1b67a33595158
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266866
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-11-01 17:15:39 +00:00
Konstantin Shcheglov 5db6b482b0 Extract RelationalPatternResolver.
Change-Id: Icd3e498d025a4889a7f9257f0556a028ac5e18d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266801
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-31 22:31:20 +00:00
Konstantin Shcheglov 3cd43b3aac Duplicate tests with 'switch' statements, to run them with experiments, and with language 2.18 - without.
Change-Id: I003fedc102ef044ff8b58883ad1fbfa702dbdd00
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266780
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-10-31 22:31:15 +00:00
Brian Wilkerson d7e43059cf Make the ResolvedLibraryResult available for refactorings
Change-Id: I03db91e675fcedc39a9031fe727a4d124c5873c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265960
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-10-31 15:31:31 +00:00
Konstantin Shcheglov 40ac0286c7 Use XyzImpl in element writer/reader, remove casts.
Change-Id: I0f4256f1419c10ac39901cd13ce2d517f273cc79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266660
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-31 15:27:38 +00:00
Samuel Rawlins 37d1142d35 Revert "[analyzer] report dead code for conditional access for definitely unassigned variables"
This reverts commit f552ffa782.

Reason for revert: broke google3

Original change's description:
> [analyzer] report `dead code` for conditional access for `definitely unassigned` variables
>
> Fixes #50308
>
> Change-Id: If7b752520169a11b15590aa6e2f9a4fafc9da18f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266381
> Reviewed-by: Samuel Rawlins <srawlins@google.com>
> Commit-Queue: Samuel Rawlins <srawlins@google.com>

TBR=srawlins@google.com,dart-scoped@luci-project-accounts.iam.gserviceaccount.com,asashour@yahoo.com

Change-Id: I67856a7bcb8ea31c9073638df8c0b2e66cbf9a90
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266661
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-10-31 14:17:27 +00:00
Ahmed Ashour f552ffa782 [analyzer] report dead code for conditional access for definitely unassigned variables
Fixes #50308

Change-Id: If7b752520169a11b15590aa6e2f9a4fafc9da18f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266381
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-10-30 22:29:07 +00:00
Konstantin Shcheglov 56dcbe8c8e Implement field promotion for the analyzer.
A field is promotable if it is private and final, and there is no
non-final field or concrete getter with the same name in the same
library.  This is the rule the language team has chosen to adopt for
which fields are promotable, because it's sufficient to ensure that
the promotion is sound, and straightforward to specify.  A more
complex rule could principle identify more fields that are soundly
promotable.

The rule has a hidden complexity, though: in circumstances where a
concrete class overrides noSuchMethod and implements an interface, if
the interface contains a private getter (or field) and the concrete
class doesn't provide an implementation for it, the compiler will
create a synthetic noSuchMethod forwarder; for soundness, this needs
to block promotion as well.

So the analyzer needs to partially replicate the logic the compiler
uses to determine whether a noSuchMethod forwarder is needed.  This is
handled by a new file, field_promotability.dart, which walks the class
hierarchy to determine which private fields and getters are in the
interface of any given class but not in its implementation.

Field promotion is not yet enabled by default; to use it you need to
enable the experiment "inference-update-2".

Bug: https://github.com/dart-lang/language/issues/2020
Change-Id: I5f4ebb6b19626961b9b4c904d69670212668552b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262865
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-30 20:02:49 +00:00
Ahmed Ashour b0b3ee8ea8 [analyzer] dead code with for statement updaters (method invocation)
Bug #43511

Change-Id: Ie784f30f97481e943087f47d6b7dc42b075334f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266388
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-10-30 16:09:33 +00:00
Konstantin Shcheglov 8089cb6a71 Use FooImpl in BarElementImpl, library children.
Change-Id: Idc1e5bf66bb1d8edfd7c346cf73709239ea5fa58
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266304
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-10-29 20:05:50 +00:00
Konstantin Shcheglov 4ee8095f6a Separate fields and top-level variables in _EnclosingContext.
We had to filter them otherwise.

Change-Id: Iaa402a0773b68e23f6da49ad05e1362d6048c0f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266305
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-29 19:59:38 +00:00
Konstantin Shcheglov bcdd9c4fba Use FooImpl in BarElementImpl, interface element children and top-level declarations.
Change-Id: I22973b86a72c29e096b78687f19846a6063acb83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266480
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-28 21:18:26 +00:00
Konstantin Shcheglov ce591144b0 Move a few ForStatement tests.
Change-Id: I972f9162d456c1a62c6bf9a7b5e645a52a214ae7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266444
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-28 19:10:48 +00:00
Konstantin Shcheglov 743b4edcce Issue 50078. Implement variableTypeFromInitializerType()
Bug: https://github.com/dart-lang/sdk/issues/50078
Change-Id: Ie07c99fea07d9a4ffda33b841ee9365fff2caf0c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266440
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-28 18:29:27 +00:00
Konstantin Shcheglov a664a9048c A couple of tweaks.
Change-Id: I0e13f14627e6f1fde95eebdc6c12ec300264c1d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266441
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-28 18:21:27 +00:00
Ahmed Ashour 98afb38b6a [analysis_server] add fixes for MISSING_OVERRIDE_OF_MUST_BE_OVERRIDDEN_*
Fixes #50312

Change-Id: I0c599dede1c2c0710d35997144db5457360b096b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266140
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-10-28 14:42:57 +00:00
Konstantin Shcheglov 2dfcce6a90 Check for the matched RecordType shape.
https://github.com/dart-lang/language/pull/2569

Change-Id: Id26c0538718cb299dc319d1a905d8dd6fc7d151b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266300
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-27 20:32:57 +00:00
Sam Rawlins 1739cc6d89 Add BODY_MIGHT_COMPLETE_NORMALLY_CATCH_ERROR hint
This is similar to BODY_MIGHT_COMPLETE_NORMALLY (the static error),
BODY_MIGHT_COMPLETE_NORMALLY_NULLABLE (the Hint for nullable return
types), and RETURN_OF_INVALID_TYPE_FROM_CATCH_ERROR, combining the
rules from each.

https://github.com/dart-lang/sdk/issues/49215 (but maybe doesn't close,
if the core issue is the VM issue)

Change-Id: I9a010e5a3f0f88abfdab479339e5e76759ae9d92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247863
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-27 18:21:47 +00:00
Ahmed Ashour fa4417bcb7 [analysis_server] RemoveDeadCode to remove following statements after dead do while
If the `do` statement has a `break`, then don't mark the following statements as dead, and don't offer a fix (for now).

Bug #43511
Bug #49091

Change-Id: I5e39aaee3dd49dc15ef2e4356b913e77e73baa75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263900
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-27 15:51:44 +00:00
Sam Rawlins f5e3e61da5 Fix COULD_NOT_INFER on top-level elements
Fixes https://github.com/dart-lang/sdk/issues/49308

Change-Id: I303ac7dda326504e73c6b612625d5eec57fe539b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262540
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-10-27 02:58:00 +00:00
Ahmed Ashour 931961eac8 [analyzer] dead code with for statement updaters
TEST=ci

Bug #43511

Change-Id: Ie7ad75b1810d1483558ea18818f30c02730da312
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263940
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-10-26 20:31:00 +00:00
Konstantin Shcheglov 9f35115b90 Use FooImpl in BarImpl getters/setters, property related.
I think we might get away with this now, because we don't let users
create elements manually.

Presubmit in google3 looks green.
https://fusion2.corp.google.com/presubmit/tap/483535261/OCL:483535261:BASE:483575659:1666678949553:5d26313d/targets

Change-Id: Id9618e2d8a15ab98c5919750461c508e87f76c7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265405
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-26 03:49:43 +00:00
Sam Rawlins 9896f1c647 Enable the unnamed-libraries experiment by default in 2.19.0
TEST=tests/language/library/unnamed_library_test.dart

Bug: https://github.com/dart-lang/language/issues/1073
Change-Id: I1c7fa7b4ee4450e344a7613525765e4ab590cc8c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265381
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-10-25 21:10:57 +00:00
Konstantin Shcheglov f282fcfa35 Prepare to publish analyzer 5.2.0 and _fe_analyzer_shared 50.0.0
Change-Id: Iebf909af9e62322d898d6db79ee5fa6f8bfe3899
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265561
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-25 21:03:37 +00:00
Konstantin Shcheglov b848f4df59 Make most Token fields in AST final.
Change-Id: If3eb33ed2e0d92f94e9152524231975ab6c47a11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265440
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-25 16:28:17 +00:00
Konstantin Shcheglov 0ad53cbc7b Update all AST nodes setters to require XyzImpl values.
Change-Id: Iaabe077a27a3d7c1dd4660b5d4b3bb9ccb746b0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265408
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-24 22:40:47 +00:00
Konstantin Shcheglov afb9609261 Deprecate buildSdkSummary2(), use buildSdkSummary() instead.
Change-Id: Iaceb38251047ba4d2cb3e051c096f148b810fbb9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265407
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-24 22:32:48 +00:00
Konstantin Shcheglov e46bade3d0 Remove a few 'is! MixinElement'.
MixinElement does not implement ClassElement anymore.

Change-Id: I0c05f8720b202ad79f3105a4638d8d3d4ff7a404
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265403
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-24 21:33:37 +00:00
Konstantin Shcheglov b8ffc08d5b Add AnalysisDriverForPackageBuild.sdkLibraryUris
https://github.com/dart-lang/build/pull/3389

Change-Id: Ib54ba5d5411fc6213ecf1733dd056f9347f27462
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265401
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-24 21:06:27 +00:00
Konstantin Shcheglov 8c1b05cd8e Create CommentImpl directly, without AstFactory.
Change-Id: I61293105570affe50340382bae250892ccfc9180
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265400
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-10-24 20:13:57 +00:00
Ahmed Ashour 5e75bb14a5 [_fe_analyzer_shared] handle $this in String interpolation
Fixes #50263

Change-Id: I4fdfab69a2d462768848f01aceb450f266e09072
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265083
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-24 16:41:13 +00:00
Konstantin Shcheglov 79b11174a2 Stop using AstTestFactory and remove it.
Change-Id: Ic0dd0794c2ed3045149d2605c340852b3f187a28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265184
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-24 16:08:12 +00:00
Daco Harkes a67c79b017 [analyzer/ffi] Native static checks
Bug: https://github.com/dart-lang/sdk/issues/49803
Bug: https://github.com/dart-lang/sdk/issues/50097

Change-Id: Id5b52be88937bcf9245f98e71afa56f079f288f0
Cq-Include-Trybots: luci.dart.try:analyzer-linux-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265085
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2022-10-24 10:04:34 +00:00
Konstantin Shcheglov 1244294c09 Enable overridden_fields in analyzer/.
Change-Id: Ie7dc6d1d8c5347fc38bf271aaa074db2da4d3e31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265221
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-21 23:15:08 +00:00
Konstantin Shcheglov 53898496a6 Use named parameters in few AST nodes.
Change-Id: I16a63c7554d63103e05a783e1c11748d9535ca7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265220
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-21 22:43:49 +00:00
Konstantin Shcheglov 664c021374 Deprecate xyz2 in elements.
Change-Id: I0dbf25882cf66670ce2d69dd22aceb053be9feb7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265182
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-21 22:07:47 +00:00
Konstantin Shcheglov 7840c54107 Report EXPECTED_ONE_LIST_PATTERN_TYPE_ARGUMENTS.
Change-Id: I59f2227dea39f13660e360815b1cf7d60c995a0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265181
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-21 21:52:18 +00:00
Konstantin Shcheglov 30c4cb00b8 Add a few more tests for PART_OF_DIFFERENT_LIBRARY.
Change-Id: I685874502d49e4a6b4164bb25cf449423659514a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-21 18:25:08 +00:00
Danny Tuppeny 27d417dc09 [analyzer] Fix setter in test
Change-Id: Ie5d31dcf300936690d9cf476bed64b8615474e8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265090
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-21 17:15:36 +00:00