Commit Graph

5661 Commits

Author SHA1 Message Date
Sam Rawlins 8a9188aae5 [analysis_server] Avoid future-of-implicit-dynamic types
This clears all of the implicit `Future<dynamic>` types in lib/.

Also a few `extends XyzVisitor<(implicit) dynamic>` are made into
`extends XyzVisitor<void>`.

Also a few raw Stream, StreamController, and Completer types.

Change-Id: I2471cc56d2d2d0545e5e103fff3189e745a54b49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287245
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-03-08 06:22:57 +00:00
Brian Wilkerson 61775822db Add a flag to the diagnostic pages to control developer support
I would prefer to have the code uncommented because it will help prevent
it from becoming stale.

Change-Id: I86dc0c715433cbeab33b3739f826475fcc583bc6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287161
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-03-07 18:06:20 +00:00
Sam Rawlins 10b7b0a001 [analyzer] Move 2 more HintCodes to be WarningCodes, ASSIGNMENT_*, MIXIN_ON_*
Bug: https://github.com/dart-lang/sdk/issues/50796
Change-Id: Ifda5fb5f9bf282d6c97fffb34318e84eb84b76c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286346
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-03-07 17:11:24 +00:00
Brian Wilkerson 27e874ad26 Update selection support for patterns
Change-Id: Ib301f4afc5d0989a805b269fdca25dfa527072c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286941
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-03-06 20:52:27 +00:00
pq 47cab3d803 + convert_to_switch_expression assist
See: https://github.com/dart-lang/sdk/issues/50417

Initial work to support return conversions.  Arguments and assignments to come and will likely lead to some refactoring but there's enough here to benefit from some early feedback.

Thanks in advance! :D

Change-Id: Ic3d0349aa12d8c951e3afe0da3e00e2777480e38
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286861
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-03-06 19:49:13 +00:00
Brian Wilkerson a4a255e1a9 Reland: Convert the AnalyticsManager to use the analytics package
Change-Id: Id3fd3fa172a77fe081ad3f718ba2c893dfd550e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286600
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2023-03-06 17:24:17 +00:00
Danny Tuppeny 21bf9f4ba6 [analysis_server] Syntax highlight the "inline" keyword
Change-Id: I1b4acaea9e0f74fda8a844bcd4d56d746a7e3bf4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286928
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-03-06 16:09:43 +00:00
Konstantin Shcheglov f67f7d11d7 Track a reason for a pattern variable inconsistency.
This allows us report more specific errors.

Bug: https://github.com/dart-lang/sdk/issues/51505
Change-Id: I6e40af1fedce55886a58b954721154db933ede17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286605
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-03-03 16:14:48 +00:00
Sam Rawlins 2c31548893 analyzer: Remove references to unimplemented FILE_IMPORT_*_LIB_REFERENCES_FILE_* rules
Lint replacement suggested at
https://github.com/dart-lang/linter/issues/4103

Bug: https://github.com/dart-lang/sdk/issues/50796
Change-Id: I2578c91af3f66a816d67bb0e9ecfa22802febf94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286345
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-03-02 18:57:08 +00:00
Danny Tuppeny 70bdf4f718 [analysis_server/lsp] Fix textDocument/implementations handling of synthetic members
Fixes https://github.com/dart-lang/sdk/issues/51515.

Change-Id: I24e11b2c5c59c393a05f224ca687fe2f8153ca86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286300
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-03-01 21:41:54 +00:00
Sam Rawlins debe8c0d83 analysis_server: Enforce deprecation messages
Change-Id: If76355480d2f0e3a93a22fe2f5bdb2e3339df230
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286202
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-03-01 21:17:49 +00:00
Sam Rawlins 16e935ebad analysis_server: Prefer type annotations over raw types in benchmark/, tool/
Change-Id: I2f0c8bfd484f5aee46395fa86cd3cfabda7c0148
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286204
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-03-01 20:40:43 +00:00
Brian Wilkerson 07c5db4d53 Revert "Convert the AnalyticsManager to use the analytics package"
This reverts commit 0b8986902e.

Reason for revert: Breaks downstream systems

Original change's description:
> Convert the AnalyticsManager to use the analytics package
>
> Change-Id: Id1822668e0ed7e12e88e990fa02247616b2e54e6
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285400
> Reviewed-by: Elias Yishak <eliasyishak@google.com>
> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
> Reviewed-by: Keerti Parthasarathy <keertip@google.com>

Change-Id: Ief9d611cf1259ae460c38fadb299f9e09d74d0f3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286242
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
2023-03-01 19:37:16 +00:00
Sam Rawlins 5aaebf2337 [analyzer] Move 4 more HintCodes to be WarningCodes, OVERRIDE_ON_*
Bug: https://github.com/dart-lang/sdk/issues/50796
Change-Id: Ib97807551c032c48ce47ee9a53752b695d1b9bc1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286200
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-03-01 19:10:03 +00:00
Kallen Tu 4f6ccd9fee [analyzer] Report an error when a subtype of a base or final type is not base, final or sealed.
Change-Id: Ie9c943e6ce7d3b1c746ccd4ee3757886dd619c5f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285441
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2023-03-01 19:01:59 +00:00
Brian Wilkerson 0b8986902e Convert the AnalyticsManager to use the analytics package
Change-Id: Id1822668e0ed7e12e88e990fa02247616b2e54e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285400
Reviewed-by: Elias Yishak <eliasyishak@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2023-03-01 17:54:52 +00:00
Danny Tuppeny e231f12420 [analysis_server] Don't endlessly rebuild analysis contexts on PathNotFound errors
Fixes https://github.com/Dart-Code/Dart-Code/issues/4280.

Change-Id: I8f36672dfd5fcca2e4be87408d385219b0a81d9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284660
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-02-28 20:27:43 +00:00
pq c85eecfe9d improve REMOVE_INVOCATION message
Change-Id: Icafeba7b651aef532fe5d3f768a5cc69c5eda99b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286062
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-02-28 20:09:07 +00:00
pq 47a524afeb + quickfix for noop_primitive_operations
Change-Id: I458cbe9213c090b8f4c34d9d81c0f1251fa10f03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285882
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-02-28 18:45:30 +00:00
Danny Tuppeny 88d277a534 [analysis_server] Split InlayHints up for type arguments
This allows each type to be hovered (to see dartdocs) or used for navigation individually.

Fixes https://github.com/Dart-Code/Dart-Code/issues/4406.

Change-Id: I93f520a49e05eb59074215dd9c0773cd50415cfe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285625
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-02-27 16:27:15 +00:00
Danny Tuppeny 12b606e9e9 [analysis_server] Fix ordering of edits that include multiple inserts at the same location
While testing "Move to File" I found the file header was being inserted at the bottom of the document in VS Code, despite the tests working correctly.

This turned out to be because we were sending edits in the same order as server generates (which are designed to be applied sequentially, so they are essentially reversed) on the assumption that order doesn't matter to LSP. This is not correct for inserts with the same offset - those are expected to appear in-order.

Because our tests also just applied the edits in reverse-order, they passed but didn't match the behaviour in VS Code.

This change reverses the order of edits when mapping to LSP (so same-offset inserts are back in "forwards order") and also updates the tests to re-sort in an order that matches VS Code's behaviour.

Change-Id: I40d6be6899e4f13dbff52f39fefb3bbd2caa3521
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285500
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-02-25 18:48:30 +00:00
Ahmed Ashour 39e1edfbcd [analysis_server] DataDriven replacedBy to replace an instance getter with a method
Fixes #50699

Change-Id: Ib0bfb1f3ce70f66fe4b2a46c3112ce8bf9fcd891
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276060
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-02-24 20:59:30 +00:00
Sam Rawlins 5a207ea99a [analyzer] Move 3 more HintCodes to be WarningCodes, UNUSED_LABEL, UNUSED_RESULT*
Bug: https://github.com/dart-lang/sdk/issues/50796
Change-Id: I2018fbff99bdc787402df01e54b7ef3d1018220d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284740
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-02-24 15:52:27 +00:00
pq 188a4215a9 quick fix for one element record types missing trailing commas
Fixes: https://github.com/dart-lang/sdk/issues/51508

Change-Id: I11c1ce8b83143ff550481318ebf0a17a9781529f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-02-23 22:00:45 +00:00
Kallen Tu fe10dec12b [analysis_server] Avoid suggesting modified classes and mixins in contexts that don't make sense.
Change-Id: I0a5ebc1812998358d20a579d496ac3a26dec17fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284488
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2023-02-23 21:44:19 +00:00
pq 4435e15649 add quick fix for single element record literal parse errors
Follow-up from https://github.com/dart-lang/sdk/issues/51446

Change-Id: I22de580e9a163dd371825a494ce92e2332edbb79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285020
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-02-23 19:18:58 +00:00
Kallen Tu b34f480e0d Reland "[analyzer/cfe] Report an error when declaring a mixin class with final, interface, or sealed."
This is a reland of commit f17e9732c5

Original change's description:
> [analyzer/cfe] Report an error when declaring a mixin class with final, interface, or sealed.
>
> Change-Id: Ia1393851dffaab55c31d04d4e81bfae83a7bd67f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283126
> Commit-Queue: Kallen Tu <kallentu@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>

Change-Id: Ic8185f38477b2eeff624ee391868d7260e0ed4cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284486
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2023-02-22 22:18:51 +00:00
Danny Tuppeny b8dc676292 [analysis_server] Fix a NPE when moving first item w/ DartDoc to another file
`firstMember.beginToken.previous!.offset` isn't safe when `firstMember.beginToken` is the first Dartdoc, because it's `previous` is null.

Change-Id: I4944da3ffd8b7b43dd5c48db1e8738d787d205a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284703
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-02-22 18:40:55 +00:00
pq 43fbb1db5e trailing comma fix for single element record literals
See: https://github.com/dart-lang/sdk/issues/51446

Change-Id: I372f05c6e87a5ee4b55edcb05cf05c035107f250
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284549
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-02-22 17:39:28 +00:00
Danny Tuppeny 658e34ee2a [analysis_server] Fix ordering of parameter+type InlayHints at the same position
Parameter name hints should always come before any other hints at the same position:

```
f(a: <int>[]);
  ^  ^^^^^
```

Change-Id: I8ae06c562e80df441fee9d3a8079c0048d01f903
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284641
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-02-22 15:38:32 +00:00
Sam Rawlins 61e1808e2f [analyzer] Move 5 more HintCodes to be WarningCodes, SUBTYPE_*, UNDEFINED_*, UNNECESSARY_*
Bug: https://github.com/dart-lang/sdk/issues/50796
Change-Id: I7d15e27697093ecbdb958900f57e40d01753fdb3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284541
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-02-22 15:24:39 +00:00
pq b0078ad057 + RECORD_TYPE_ONE_POSITIONAL_NO_TRAILING_COMMA diagnostic
See: https://github.com/dart-lang/sdk/issues/51446

Change-Id: I4ebb0a8978bd98fc658737f69b790c2039c17d52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284501
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-02-22 02:07:53 +00:00
Kallen Tu 57107ae59b [analysis_server] Add code completion for class modifiers at the beginning of a declaration.
Change-Id: I9dc1d80264d052c8f2ac75978e64280bd271f8d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/282440
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2023-02-21 19:31:55 +00:00
Danny Tuppeny bc91549aea [analysis_server] Use the more specific "refactor.move" for Move Class to File
VS Code refactors based on kind and shows some well-known kinds in a specific order. One new group is "refactor.move".

It's not yet in the LSP spec/code-gen, so is added to our custom enum in the meantime.

Fixes https://github.com/Dart-Code/Dart-Code/issues/4354.

Change-Id: I5577ef67a81667652258b873125dc491d96ce597
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284144
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-02-21 17:27:27 +00:00
Danny Tuppeny e8a8e10bcd [analysis_server] Include Type inlay hints for inferred type arguments + literals
Fixes https://github.com/Dart-Code/Dart-Code/issues/4366.

Change-Id: I92b28869961a6098031a21ca1cf0d34f4decd16c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284143
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-02-21 17:07:25 +00:00
Konstantin Shcheglov a70386bfd6 Report CONSTANT_PATTERN_NEVER_MATCHES_VALUE_TYPE
Change-Id: I782bcf984e47162340baf96245dab8792fa3cbe0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284241
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-02-21 17:01:32 +00:00
Konstantin Shcheglov 3f288db57e Issue 51046. Implement primitive equality.
Bug: https://github.com/dart-lang/sdk/issues/51046
Change-Id: I2190b9e36753cc5f4708597ae0b515430d2f7bf2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283440
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-02-18 06:22:04 +00:00
Jackson Gardner d90a06bf89 Revert "[analyzer] Move 6 more HintCodes to be WarningCodes, STRICT_*, SUBTYPE_*, UNDEFINED_*, UNNECESSARY_*"
This reverts commit 86278e3c2e.

Reason for revert: This is breaking flutter customer tests. See https://github.com/flutter/flutter/issues/120992

Original change's description:
> [analyzer] Move 6 more HintCodes to be WarningCodes, STRICT_*, SUBTYPE_*, UNDEFINED_*, UNNECESSARY_*
>
> Bug: https://github.com/dart-lang/sdk/issues/50796
> Change-Id: Ic65b01d19984874c442722de472b21701f85ee5d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283400
> Commit-Queue: Samuel Rawlins <srawlins@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: https://github.com/dart-lang/sdk/issues/50796
Change-Id: Ia2eaba6ebbbad13fe31b783b39c02b1adce322b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283923
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jackson Gardner <jacksongardner@google.com>
Reviewed-by: Jackson Gardner <jacksongardner@google.com>
2023-02-17 19:37:29 +00:00
Sam Rawlins 59d7ca176f [analyzer] Move 7 more HintCodes to be WarningCodes, INVALID_*
Bug: https://github.com/dart-lang/sdk/issues/50796
Change-Id: I7ce6ec4562352d5ed7d6f4b3d6de3316ed9271e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283701
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-02-17 14:51:17 +00:00
Devon Carew 39603fd3d0 [dart fix] remove a check that a lint code was enabled when performing a bulk fix
Bug: https://github.com/dart-lang/sdk/issues/51427
Change-Id: I67ae94d626d16ac831996b1ce4da626afcfccd56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283462
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-02-17 00:58:41 +00:00
Kallen Tu 3118002665 Revert "[analyzer/cfe] Report an error when declaring a mixin class with final, interface, or sealed."
This reverts commit f17e9732c5.

Reason for revert: Merged this and forgot there were dependencies that needed to be merged first.

Original change's description:
> [analyzer/cfe] Report an error when declaring a mixin class with final, interface, or sealed.
>
> Change-Id: Ia1393851dffaab55c31d04d4e81bfae83a7bd67f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283126
> Commit-Queue: Kallen Tu <kallentu@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>

TBR=scheglov@google.com,johnniwinther@google.com,kallentu@google.com,dart-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: Ia339aac26ecd20aa8725cc9109919e3cbef6363b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283741
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-02-16 22:10:33 +00:00
Kallen Tu f17e9732c5 [analyzer/cfe] Report an error when declaring a mixin class with final, interface, or sealed.
Change-Id: Ia1393851dffaab55c31d04d4e81bfae83a7bd67f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283126
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-02-16 21:27:28 +00:00
Keerti Parthasarathy 71bbeddf00 Add quick fix for invalid_constant_pattern_binary and invalid_constant_pattern_negation diagnostic.
Bug: 49960
Change-Id: Ib6c6951da8febd5bbe53b704d34530da0e47a0e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283461
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2023-02-16 20:22:54 +00:00
Danny Tuppeny ba3171ae3e [analysis_server] Include types in tooltips for record fields in patterns
Change-Id: I768fe2b44a25b43c36c65414807b2201ebe97665
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283640
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-02-16 15:16:31 +00:00
Sam Rawlins 86278e3c2e [analyzer] Move 6 more HintCodes to be WarningCodes, STRICT_*, SUBTYPE_*, UNDEFINED_*, UNNECESSARY_*
Bug: https://github.com/dart-lang/sdk/issues/50796
Change-Id: Ic65b01d19984874c442722de472b21701f85ee5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283400
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-02-16 14:47:49 +00:00
Keerti Parthasarathy 962d4342a7 Wire up two more pattern diagnostics for fixes
Change-Id: I298fb7295d3f9ff97a9d6f28abd93bbdda6692aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283344
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-02-15 22:46:57 +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
Johnni Winther 0937087af8 [parser] Improve error recovery for constant patterns
This allows the parser to parse constant patterns at lower precedence
level in order to recognize more expressions in this context. To
support this, _parsePrecedenceExpressionLoop special cases a few cases
that should _not_ be parsed as expression in a constant pattern context.

Closes #50996

Change-Id: I43bb0ce52d366bd2dfcf47e12eec5883402f668a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/282100
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2023-02-15 13:49:37 +00:00
Johnni Winther d4a73e3b82 [cfe] Report errors on invalid const patterns with explicit 'const'.
Change-Id: I4f5994fd1f0d5e5289684e0da2f03720706f6d28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281840
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-02-15 10:34:28 +00:00
Brian Wilkerson 6189798117 Support completions of and in when clauses
Change-Id: Ia02aebfe1dd90d46ae4207e38f8391b4e33f2ee9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283241
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-02-15 04:47:41 +00:00