Commit graph

895 commits

Author SHA1 Message Date
Konstantin Shcheglov 8828fee865 Deprecate ExecutableElement.returnType, use returnType2 instead.
Change-Id: Ibd29c3fbec0439236c2cf45c57f820c45427df9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311932
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-06-29 23:16:59 +00:00
Konstantin Shcheglov fae9e418ea Deprecate Element.enclosingElement, use enclosingElement2 instead.
Change-Id: I78edb6d433949eb8bd86f397fb873a078edf9fc4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311827
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-29 19:45:19 +00:00
Konstantin Shcheglov a8a3f3f77e [CMSR] Improve 'get invocation' implementation.
Change-Id: I871eddc1727ea6a51e169f4031d55ba3bc93527d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-22 14:38:38 +00:00
Konstantin Shcheglov 6a4f127831 [CMSR] Not available if external executable element.
Change-Id: Icf209c8cd844918a62195f8a024f0c0b8922f0d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310705
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-21 19:51:58 +00:00
Konstantin Shcheglov edd17a8638 Merge AST interfaces into implementation library, re-export.
Bug: https://github.com/dart-lang/language/issues/3135
Change-Id: Icbc2a4e506e9e58c830b53f7aecce92189bb2d1b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308402
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-06-10 16:57:59 +00:00
Danny Tuppeny a3399e3616 [analysis_server] Add support for adding imports with show/hide + update Move to File
Change-Id: I5c732c969a9a89af76b82e60ac652cf00bb878bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/306920
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-06-06 17:05:42 +00:00
Konstantin Shcheglov 64fcb8de1b Prepare for removing deprecated methods from NamedType.
The actual removal will happen in (to be rebased on top of this):
https://dart-review.googlesource.com/c/sdk/+/303280

Fixing direct uses of the deprecated `Identifier get name` is apparently
only about a half of the work. I should have followed my own advice to
the clients and prepared better.

These changes are necessary because we will stop creating and
visiting `Identifier`, and so `NamedType` should be handled directly.

Change-Id: Ie07b75b15eab277ed6c9b29a838561a7eb71f588
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303425
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-18 01:54:21 +00:00
Konstantin Shcheglov a3956e49d0 Use InvalidType instead of DynamicType when unresolved.
Bug: https://github.com/dart-lang/sdk/issues/36697
Change-Id: If982ca46030959160f21950c5b5e3127895d937b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/300181
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-10 20:38:48 +00:00
Danny Tuppeny dd72682815 [analysis_server] Handle completion for conditional imports
Fixes https://github.com/Dart-Code/Dart-Code/issues/4530.

Change-Id: Iac1ec0467fa9d1838f75ff2512e1ca79f02fade8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302205
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-05-10 16:19:32 +00:00
Konstantin Shcheglov 036b8cafad Add AnalysisError.tmp() constructor, deprecate the default one.
Bug: https://github.com/dart-lang/sdk/issues/51985
Change-Id: I1204c71a4c5ea62d32d65662ecb5274dacb0bfae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301730
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-08 14:39:29 +00:00
Konstantin Shcheglov ec330b47de Deprecate 'DartType.isDynamic', use 'is DynamicType' instead.
Change-Id: Ia3660a0d38f01a590dd3e034f40dbdb5a432638a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/300042
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-01 16:09:08 +00:00
Konstantin Shcheglov 4756d077ed Update NamedType to use ImportPrefixReference and name token.
Using Identifier expression inside NamedType does not make sense.

Change-Id: I4a61d2b472fd66fb7c5e6e92a80cccb391b06d49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294920
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-04-28 17:31:46 +00:00
Konstantin Shcheglov e8622f2d63 Issue 52059. Don't suggest final/var in ObjectPattern in ForEachPartsWithPattern, suggest getters instead.
Bug: https://github.com/dart-lang/sdk/issues/52059
Change-Id: If5e1c40fa75735077b2b77a5941d16fe2c767f3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/296501
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-20 16:14:58 +00:00
Brian Wilkerson 2da2520bd6 Stop suggesting methods in object patterns
Fixes: 52058
Change-Id: I031fcd2b48975729cca48f640c3d86f5d2cfc0b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/296420
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-04-20 00:52:20 +00:00
Konstantin Shcheglov 1d718fc7e9 Issue 52051. Fix a crash, add a branch for RecordLiteral in _argumentListContext()
Bug: https://github.com/dart-lang/sdk/issues/52051
Change-Id: I2c8c2271cc51fbe1c013c6ac324052c347dd379b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/296361
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-19 22:07:59 +00:00
Konstantin Shcheglov dc34fe9f86 Deprecate IfElement/IfStatement.condition, use 'expression'.
Change-Id: If43b4b71a21fd256ce8d1367d4b233e1cff764b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/296122
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-04-19 17:17:28 +00:00
Keerti Parthasarathy 90c434254f Add support for patterns for Add type quick fix
Bug: 51866
Change-Id: Id38d0c8405931cad057ec3db1e0c0e3d297d7b4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294880
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2023-04-14 20:09:52 +00:00
Konstantin Shcheglov b1c0f16a51 Issue 51961. Suggest getter names inside pattern of named PatternField without name, inside RecordPattern.
Bug: https://github.com/dart-lang/sdk/issues/51961
Change-Id: I33b499829887dc221c2d18fe4586ec08207c026f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293863
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-04-06 19:55:08 +00:00
Konstantin Shcheglov 7ba94c9202 Issue 51961. Suggest getter names inside pattern of named PatternField without name, inside ObjectPattern.
Bug: https://github.com/dart-lang/sdk/issues/51961
Change-Id: Ibd6f762f4e363f26daaca21515a9c23c748f8cc9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293901
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-05 22:47:19 +00:00
Konstantin Shcheglov 2427527612 Suggest type names during completion in CaseClause and SwitchExpression body.
Change-Id: Iea7c2c3d0879191265c368b5e79fbf2cfaab0dd0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293821
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-05 20:48:24 +00:00
Samuel Rawlins 77446204da Reland "[analyzer] Move 4 more HintCodes to be WarningCodes, UNUSED_*"
This reverts commit e48f35b43d.

Reason for revert: linter is fixed.

Original change's description:
> Revert "[analyzer] Move 4 more HintCodes to be WarningCodes, UNUSED_*"
>
> This reverts commit 0ef7ed2ebd.
>
> Reason for revert: Tests are failing in google3 - linter needs to be bumped
>
> Original change's description:
> > [analyzer] Move 4 more HintCodes to be WarningCodes, UNUSED_*
> >
> > Bug: https://github.com/dart-lang/sdk/issues/50796
> > Change-Id: Ib5b153bc6e64bc433df1f05c53d82f71b470bbec
> > TEST=presubmit bots
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290703
> > Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> > Reviewed-by: Alexander Aprelev <aam@google.com>
> > Commit-Queue: Samuel Rawlins <srawlins@google.com>
> > Reviewed-by: Nate Bosch <nbosch@google.com>
>
> Bug: https://github.com/dart-lang/sdk/issues/50796
> Change-Id: If1c460bdcf422033648417da5ba2f5fbc1b459c2
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291460
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Auto-Submit: Oleh Prypin <oprypin@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>
> Commit-Queue: Alexander Thomas <athom@google.com>
> Commit-Queue: Oleh Prypin <oprypin@google.com>

Bug: https://github.com/dart-lang/sdk/issues/50796
Change-Id: Ie503b57a19df1a50cb3dfe50c840d20779310e87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291560
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Oleh Prypin <oprypin@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-03-28 21:26:58 +00:00
Oleh Prypin e48f35b43d Revert "[analyzer] Move 4 more HintCodes to be WarningCodes, UNUSED_*"
This reverts commit 0ef7ed2ebd.

Reason for revert: Tests are failing in google3 - linter needs to be bumped

Original change's description:
> [analyzer] Move 4 more HintCodes to be WarningCodes, UNUSED_*
>
> Bug: https://github.com/dart-lang/sdk/issues/50796
> Change-Id: Ib5b153bc6e64bc433df1f05c53d82f71b470bbec
> TEST=presubmit bots
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290703
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Reviewed-by: Alexander Aprelev <aam@google.com>
> Commit-Queue: Samuel Rawlins <srawlins@google.com>
> Reviewed-by: Nate Bosch <nbosch@google.com>

Bug: https://github.com/dart-lang/sdk/issues/50796
Change-Id: If1c460bdcf422033648417da5ba2f5fbc1b459c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291460
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Oleh Prypin <oprypin@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Commit-Queue: Oleh Prypin <oprypin@google.com>
2023-03-28 07:16:42 +00:00
Sam Rawlins 0ef7ed2ebd [analyzer] Move 4 more HintCodes to be WarningCodes, UNUSED_*
Bug: https://github.com/dart-lang/sdk/issues/50796
Change-Id: Ib5b153bc6e64bc433df1f05c53d82f71b470bbec
TEST=presubmit bots
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290703
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2023-03-27 21:41:12 +00:00
Konstantin Shcheglov edccf64f54 Fix for highlighting mixin names.
Change-Id: Idadb02aa1b86525fde307a5eddc8876f152d1b31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291045
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-03-24 21:37:57 +00:00
Konstantin Shcheglov 04c1d58a4a Use mixins for analyzer packages, to prepate for language 3.0
Change-Id: I28fb5cf51c5dae887f19613d874d1ff264954be0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290912
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-03-23 23:57:53 +00:00
Konstantin Shcheglov e8f6276a46 Update navigation region from PatternField.name to the referenced element.
Unfortunately, IntelliJ cannot easily support `foo:`, only `foo`.
So, I update it to navigate from `foo`, explicit or variable.

Bug: https://github.com/dart-lang/sdk/issues/51797
Change-Id: If4cbf553beedf2998cd6ad3fbd7528865b523420
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290904
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-03-23 18:02:09 +00:00
Sam Rawlins 6333e318cd [analyzer] Move 2 more Hints to be Warnings, DEAD_CODE*
Bug: https://github.com/dart-lang/sdk/issues/50796
Change-Id: Ie7a6cb94cefaf4f551ed766e637bac3606c0f5ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279463
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-03-21 21:55:08 +00:00
Danny Tuppeny ee12bb3572 [analysis_server] Support multiple prefixes (and/or unprefixed) imports in ChangeBuilder
Change-Id: Ic73d93d7f1475c5eac21fa698181718c7e646b81
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288780
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-03-21 19:21:22 +00:00
Konstantin Shcheglov 2a264085bd Implement navigation from PatternField.name to the referenced element.
See also https://github.com/dart-lang/sdk/issues/51797

Change-Id: I22b122a35b77ce40a73cc7d4bc8f295a5b9e4dc6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289921
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-03-21 17:01:58 +00:00
Sam Rawlins f46c9afc12 [analysis_server] Add type arguments to remaining raw types
The Maps are all JSON, so they become `Map<Object?, Object?>`.

Most other types get a `Object` or `Object?` type argument, and a
few also get `dynamic`.

Change-Id: I097318defed55360b5b0d910bd2d085a121e97b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287673
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-03-16 20:37:57 +00:00
Konstantin Shcheglov 5ecf6db857 Deprecate 'DartType.isVoid', use 'is VoidType' instead.
Maybe? With an explicit type check we don't try to make an impression
that anything more happens here, e.g. for type parameters.

Similarly, for https://github.com/dart-lang/sdk/issues/36697 we would need to introduce `InvalidType`, which is not `DynamicType`. And so, `DartType.isDynamic` should not return `true` for `InvalidType`, it is not a property that various types may have, and should be replaced with explicit `is DynamicType`.

We also have `UnknownInferredType`, but it should never leak to clients.

Change-Id: I302b06355143d97bb52922c805dbad585a522e0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288340
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-03-14 18:50:33 +00:00
Robert Nystrom 56eaffb392 [flip-patterns] Enable "records" and "patterns" experiment flags.
This turns on the flags for these two language features and makes
them generally accessible.

Doing so causes a number of tests to fail, but the failures are
approved and there are filed issues for them. Most of the
failures are minor or only affect code using the new language
features.

This CL:

- Enables the features in experimental_features.yaml.
- Re-generates all of the various files generated from that.
- Makes some analyzer and front end changes that this CL
  inherited from Paul's original CL flipping all of the 3.0
  feature flags. I don't know what these changes are about, but
  I assume they are necessary.
- Pins a couple of tests to 2.19 since they deliberately test
  behavior that is specific to 2.19. (For most test changes, I've
  landed them separately, but there are a couple of stragglers
  in this CL.)

This doesn't enable "class-modifiers" or "sealed-types" and doesn't
include the core lib changes related to those.

TEST=On bots

Change-Id: Id387753772286a958e20a3589a6e983995f2e4a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286344
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-03-10 20:02:23 +00:00
Sam Rawlins 49a3fb4f96 [analyzer] Separate the HTML parser utility from the DOM
With the parser code in the same library as the DOM classes, the
`pkg/analyzer/tool/messages/generate.dart` program, which generates all
of the diagnostic classes and diagnostics, _depends_ on a library
with a `parse` method which depends on these diagnostic classes (in
order to report errors while parsing HTML). This means that if
there is any existing error (like an unknown identifier) in the
existing error codes, it is impossible to generate the error codes.

Since we don't need the `parse` method to generate diagnostics, we
split up the library and remove the indirect dependency.

Separating the parser code out removes the loop.

Change-Id: Ifb9e9fd979e341ae64a1ed49aaf3758d3dcf1dee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287220
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-03-08 03:06:19 +00:00
Brian Wilkerson 219521d9cd A small optimization for LocalDeclarationVisitor
I doubt that this will have any significant performance impact, but it
seems wasteful to invoke all of the 'generalized' visit methods when
the only important one is `visitNode`.

Change-Id: Ie574d1456a4cccb26090c36f7f6340445bba4006
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287160
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2023-03-07 18:14:23 +00:00
Oleh Prypin 88ac4a27a1 Revert "Roll the latest dart_style into the SDK."
This reverts commit bbba3c9788.

Reason for revert: latest dart_style has a few bugs and overall the changes should be discussed more

Original change's description:
> Roll the latest dart_style into the SDK.
>
> This includes support for records, patterns, sealed classes, and class
> modifiers. It also includes a fairly small number of style changes. The
> one that will be most noticeable is more compact switch statements.
>
> Change-Id: I9e89ba82d52bfa451fc54f9dd59048d72db48377
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285460
> Reviewed-by: Alexander Thomas <athom@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Commit-Queue: Bob Nystrom <rnystrom@google.com>
> Auto-Submit: Bob Nystrom <rnystrom@google.com>

Change-Id: I12fad53bdc75dda349b9362aeb84e798983bfa25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286420
Reviewed-by: Alexander Thomas <athom@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Auto-Submit: Oleh Prypin <oprypin@google.com>
Commit-Queue: Oleh Prypin <oprypin@google.com>
2023-03-02 13:16:36 +00:00
Robert Nystrom bbba3c9788 Roll the latest dart_style into the SDK.
This includes support for records, patterns, sealed classes, and class
modifiers. It also includes a fairly small number of style changes. The
one that will be most noticeable is more compact switch statements.

Change-Id: I9e89ba82d52bfa451fc54f9dd59048d72db48377
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285460
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2023-03-01 16:08:40 +00:00
Brian Wilkerson 392c2d6413 Add more tests for pattern variables
Change-Id: I44cab7deebf8e3be15890427055e833c00c5d322
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283963
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-02-20 01:23:28 +00:00
Brian Wilkerson 3512e6e636 Produce suggestions for pattern variables
Change-Id: Icbef58507a63bde636dc70a981cd6e2083990a29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283743
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-02-17 18:51:11 +00:00
Brian Wilkerson 77f3b44c5f Clean-up private method in OpType
Change-Id: I4262f49e0f6ab0f9153797d58113081b79f92615
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283402
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-02-15 21:39:08 +00:00
Brian Wilkerson ea3b2e3038 Support code completion in several new places
Change-Id: Ic663a7ba2b9d8995f601320df4d3254ae4917094
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283341
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-02-15 19:23:37 +00:00
Brian Wilkerson 5240b96b62 Support completion in for loops with patterns
Change-Id: I9d5c57e4e9c42abfbdc2a7dd85fc998826fa8342
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/282390
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-02-13 20:55:14 +00:00
Brian Wilkerson 77174eff4a Support completion in switch expressions
Change-Id: I21df4780eed21043b3d97ea0e55c50285e4c9b28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/282700
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-02-13 18:17:58 +00:00
Brian Wilkerson 243d7e5c39 Support completion in a relational pattern
Change-Id: Id31a1e27f70259383ba02f0de5e0c499fb9680cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/282384
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-02-10 18:32:58 +00:00
Brian Wilkerson d4a9f2b32e Additional completions in switch pattern case
Change-Id: I25aa3ab3d6b8ce9974c40d6b7e776112599e4395
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/282163
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-02-10 15:26:17 +00:00
Brian Wilkerson 872a6a4caa Add completion support for map patterns
Change-Id: I8560ecdabb484290066b6cc4cb2a77f72163a995
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281466
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-02-09 18:15:58 +00:00
Konstantin Shcheglov ebdb53fe85 Rename to PatternField and PatternFieldName.
Change-Id: I534e13fb8843e0b4a961cdf981016f7504858ba6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281782
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-02-08 23:44:54 +00:00
Brian Wilkerson 22882c4e28 Add support for constant-requiring patterns
Change-Id: Iaad0ec10a35059da85a79823cbf5de5eadd8d4e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281344
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-02-07 22:18:06 +00:00
Brian Wilkerson b23e801e7c Support completion in type argument lists
Change-Id: Ic861f571fcef15c2f4de082e23bf2521ad2b9402
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281283
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-02-07 16:01:54 +00:00
Brian Wilkerson 5d817747b5 Support completion in a list pattern
Change-Id: I0c01ff8aa7515b8f8f8b6dbb0a74aac0015e0460
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281222
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-02-07 14:44:58 +00:00
Sam Rawlins ca844e74e0 [analyzer] Rename all 'servicesPort' variables to 'servicePort'
I am going to plumb some of this support through the flutter_tools
side, and want a consistent name for this port. 'servicePort' seems to
be more correct.

Change-Id: I73806e1d4c566a82605812504cb354c2b59710ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280562
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-02-03 01:35:28 +00:00