Kallen Tu
2954986a7e
[parser] Add errors for using class modifiers on enums.
...
Otherwise, in its current state, there's no clear error for any modifiers when used before an enum declaration.
This follows the same format to FINAL_MIXIN_CLASS and those groups of errors.
Bug: https://github.com/dart-lang/sdk/issues/51935
Change-Id: I8174b6894c95fef5c0f4704927b161942c19d3ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294122
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2023-04-13 14:59:57 +00:00
pq
a45fc0f3c2
TokenType extension
...
See also: https://github.com/dart-lang/linter/pull/4272
Change-Id: Ie12b5d6a214bd085e12acf3b0c3745278aa7a8f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294881
Commit-Queue: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2023-04-12 22:50:27 +00:00
pq
05965ef720
+ fix dangling library comments
...
Change-Id: Ia857fec46ddf83d307cd19450cea88aab8c86a38
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294430
Commit-Queue: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2023-04-11 20:17:38 +00:00
pq
68ef7530d7
switch expression conversions (and unnecessary breaks removed)
...
All auto-converted. A bunch more will be convertible when we address: https://github.com/dart-lang/sdk/issues/52005
EDIT: updated w/ 64 fewer breaks
Change-Id: I9b6009e316341e7c9b9c2f2c651b6eada385960d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294423
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
2023-04-11 19:56:05 +00:00
Jens Johansen
99395b2b0c
[parser] Recover differently from mixin with clause
...
Fixes #50838 (https://github.com/dart-lang/sdk/issues/50838 )
Change-Id: Ib0f0c01a07ab6232732a2be6c3aec34cb4bfdd29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292360
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2023-04-11 16:29:53 +00:00
pq
f37e85049e
Support bulk fixing dangling library doc comments
...
We generally only test bulk fixes when we're worried about overlapping fixes. Since this can only be applied once per file I didn't feel it necessary to add any tests. Happy to if you feel otherwise!
Change-Id: Id74f8b2f9b1acd70bef789ad83406a71d5ddf391
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294422
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
2023-04-11 00:37:30 +00:00
Konstantin Shcheglov
9a6335fe14
Add "Unwrap 'if' body" assist.
...
Sometimes I realize that the `if` statement is not necessary, and
want to replace it with its `then` statement. With this Quick Assist
we can make the change without temporarily unbalancing `{` and `}`.
Change-Id: Icab454ad21e4babaada3cf58a4a3cccdb84c2ebe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294283
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
2023-04-10 23:51:55 +00:00
Devon Carew
b603d4c4ac
[deps] rev tools, web_socket_channel, webdev
...
Revisions updated by `dart tools/rev_sdk_deps.dart`.
tools (https://github.com/dart-lang/tools/compare/cd799be..58d9147 ):
58d9147 2023-04-07 Christopher Fujino [unified_analytics] Add NoOpAnalytics (#77 )
web_socket_channel (https://github.com/dart-lang/web_socket_channel/compare/40eb236..b28bae6 ):
b28bae6 2023-04-07 Rexios Allow passing through custom http client in IO socket connect (#259 )
1064b47 2023-04-07 Nate Bosch Fix deprecated_new_in_comment_reference (#262 )
webdev (https://github.com/dart-lang/webdev/compare/22b34e3..7546291 ):
75462913 2023-04-07 Elliott Brooks Run mono_repo generate (#2081 )
9964ebab 2023-04-07 dependabot[bot] Bump actions/labeler from 4.0.2 to 4.0.3 (#2067 )
3dee56b5 2023-04-07 Anna Gringauze Remove eval error message on async frames (#2073 )
d6b3e9ce 2023-04-07 Elliott Brooks Dart Code Metrics follow-up (#2072 )
48e3211a 2023-04-07 Elliott Brooks Update the release script to take into account `pubspec_overrides.yaml` (#2080 )
fd75f511 2023-04-06 Elliott Brooks Reset Webdev to 3.0.5-dev (#2077 )
Change-Id: Iac863f7c4822fe6b9585e80e95d69467e8d60b6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294364
Reviewed-by: Nate Bosch <nbosch@google.com >
Commit-Queue: Devon Carew <devoncarew@google.com >
Auto-Submit: Devon Carew <devoncarew@google.com >
2023-04-10 17:44:36 +00:00
Danny Tuppeny
cf8aaebc4a
[analysis_server] Prevent colon from automatically triggering completion in switch statements
...
See https://github.com/dart-lang/sdk/issues/51980 .
Change-Id: I66d52018f22442241a3203c08e3a58d5f1c2fbff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294300
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2023-04-08 16:17:20 +00:00
Brian Wilkerson
9b1798e081
Finish evaluating the status of fixes
...
Change-Id: Ie9a6709eb50f16771a340109bbd3e37918b8743e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294260
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2023-04-07 23:50:37 +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
Danny Tuppeny
da1898e0c7
[analysis_server] Prevent "dart fix" prompts if do-not-show preferences cannot be persisted
...
See https://github.com/dart-lang/sdk/issues/51968 .
Change-Id: I67e0a85f171b9ff5c508063458fc92491c8e5c70
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294000
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2023-04-06 15:59:07 +00:00
Konstantin Shcheglov
ef79407d04
Enable language 3.0 for analysis_server/.
...
Change-Id: I6237a9ecfa95438ad1a5959183722cf95fe1cbba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293740
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2023-04-06 00:27:09 +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
Janice Collins
b6cf3f9c22
Fix npe in UserPromptPreferences
...
Bug: https://github.com/dart-lang/sdk/issues/51968
Change-Id: I7bcaee7266b6c39ca21e11d3cc5e4eed94981294
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293920
Reviewed-by: Jacob Richman <jacobr@google.com >
Commit-Queue: Janice Collins <jcollins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2023-04-05 22:31:06 +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
Konstantin Shcheglov
006c60690e
Increase timeout for SelectionCoverageTest.
...
Change-Id: Ic1e88478b500f87744dec64f3990f2681351a178
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293742
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2023-04-05 18:34:08 +00:00
Janice Collins
17dd6d27cc
Enable analytics support for VSCode.
...
Change-Id: Iea17bf917deccadb26a78470fabfb6fe5f4ada71
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292900
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Janice Collins <jcollins@google.com >
2023-04-05 18:19:21 +00:00
Keerti Parthasarathy
a02f252ef1
Revert "Add support for patterns for Add type quick fix"
...
This reverts commit f4773e49c0 .
Reason for revert: Breaks server tests
Original change's description:
> Add support for patterns for Add type quick fix
>
> Bug:51866
> Change-Id: I42d4443c38fc7708a2b174a80b689adfc0a37aaa
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293460
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Bug: 51866
Change-Id: I5d1f933fa7b88495f941b30001873c33206975f0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293820
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Auto-Submit: Keerti Parthasarathy <keertip@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2023-04-05 18:13:37 +00:00
Keerti Parthasarathy
f4773e49c0
Add support for patterns for Add type quick fix
...
Bug:51866
Change-Id: I42d4443c38fc7708a2b174a80b689adfc0a37aaa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293460
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2023-04-05 17:53:59 +00:00
Brian Wilkerson
7bcc913ef1
Evaluate the remaining compilation errors
...
Change-Id: I9506c550598410533523e96d4ebd634589720725
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293387
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
2023-04-05 16:21:41 +00:00
Kallen Tu
b565a2f4c7
[analysis_server] Fix code completion for mixin declarations and class
...
declarations with class modifiers.
Fixes what modifiers are suggested considering you can only use 'base'
on mixins and mixin classes.
Also fixes some existing bugs with classes suggesting 'sealed' after
'abstract'.
Change-Id: I3fcd1470dc015cb0c9c1c358041ca226aa298dc8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293340
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2023-04-05 16:05:35 +00:00
Sam Rawlins
7d6ab9bdfd
Allow dead code in completion_metrics script.
...
Change-Id: I16751bcbb25f09c3a897de82c06ab424abcfcf1b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293005
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2023-04-04 23:15:31 +00:00
Sam Rawlins
23b73d7ca4
ignore unreachable constructors in reflective tests
...
These were flagged as unused by `unreachable_from_main` but they are
used by `dart:mirrors`.
Change-Id: I3637b4b234f0bf7fe795977cb7ec6a1ca5449810
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293006
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2023-04-04 21:37:18 +00:00
Konstantin Shcheglov
d47cd99310
Report NOT_NAMED_FIELD_IN_OBJECT_PATTERN
...
Change-Id: Iea58d3cef38c07f5fbac0dcbc8984ea727ffd93e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293441
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2023-04-04 21:36:38 +00:00
Konstantin Shcheglov
784998da98
Fix for EXPECTED_TOKEN, replace ':' with '=>' in SwitchExpressionCase.
...
Change-Id: I38080d8ec445bb6466c26c0233ac6dc719ba6f40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293084
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2023-04-04 19:14:25 +00:00
Paul Berry
a3f5cfdc7f
Patterns parsing: recover when switch statement syntax used for switch expressions.
...
This change ensure that if the user makes an erroneous switch
expression by imitating the syntax of case statements (i.e. using
`case`, `default`, `:` instead of `=>`, or `;` instead of `,`), error
recovery will understand the user's intent, avoiding follow-on errors.
Fixes #51886 .
Bug: https://github.com/dart-lang/sdk/issues/51886 , https://github.com/dart-lang/sdk/issues/51943
Change-Id: Icd405d4fd4ddfb1aadcf0867e5a51ba898d4cdbc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293200
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2023-04-04 18:52:59 +00:00
Konstantin Shcheglov
c399536c3f
Remove print() from getProcessUsage() test.
...
Change-Id: I0209e96e933713fa04e87f7c41e4be19b81c4001
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293163
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2023-04-04 16:15:39 +00:00
Danny Tuppeny
b7fbf1e4b2
[analysis_server] Fix completion snippet context for inside enum declarations
...
Previously we'd fail to match anything here and end up using "top level", showing snippets for creating classes. This adds enums to "inClass" showing things like "function" snippets.
I didn't split class/enums because right now we don't have any snippets that would differ, though we might want to do this if that changes.
Fixes https://github.com/Dart-Code/Dart-Code/issues/4473 .
Change-Id: I67c8e2a67698fb15136cba68b63549acf29ee596
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292884
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2023-04-04 15:08:41 +00:00
Paul Berry
8aa48712be
Patterns parsing: recover from patternVariableDeclaration non-statement.
...
Previously, if a pattern variable declaration appeared outside of a
function or method, the parser would get very confused. Now it
recognizes the situation, issues a comprehensible error message, and
replaces the pattern with a synthetic identifier token so that the
analyzer AST is somewhat sensible.
Fixes #51322 .
Bug: https://github.com/dart-lang/sdk/issues/51322
Change-Id: Ica5f060cb483a39c4e50942d639939b1fab40bea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293087
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2023-04-04 14:55:00 +00:00
Johnni Winther
5518abf1c7
[_fe_analyzer_shared] Update non-exhaustive message
...
This updates the message report for non-exhaustive switch statements
and expressions to include the witness in the problem message and
a reduced witness, which doesn't include properties that fully cover the
static type. The message is also split into two messages; one for
switch statements and one for switch expressions, allowing for a
better wording regarding the default/wildcard pattern case.
Change-Id: I17db657ef12ade5d47fa96bf69b8807e33ed5b8c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293040
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2023-04-04 09:44:59 +00:00
Keerti Parthasarathy
5c5f4ef65e
Add a timer to send analytics data periodically.
...
Change-Id: Iaf58e3b7f45868579892ded8c005843d2f45b443
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289402
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Keerti Parthasarathy <keertip@google.com >
2023-04-04 03:27:27 +00:00
Konstantin Shcheglov
525376cc88
Fix ConvertToSwitchExpression when SwitchStatement is empty.
...
Change-Id: Id7ab8319ff5a9e41b353ed1363ce0d5159fe4ff2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292984
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2023-04-03 23:44:48 +00:00
Konstantin Shcheglov
4cb8bd0c37
Issue 51931. Fix for LATE_PATTERN_VARIABLE_DECLARATION.
...
Bug: https://github.com/dart-lang/sdk/issues/51931
Change-Id: I2b3c42389a5184086e66a1fc35c045d2581a2d8b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293004
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2023-04-03 22:35:58 +00:00
Brian Wilkerson
40973edbb5
Handle type arguments when replacing an empty map pattern
...
Change-Id: I4c917d60d93a316459f2478cc21a7845af46781b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292920
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2023-04-03 21:02:18 +00:00
Brian Wilkerson
aa1f415e4f
Add a fix for invalid_inside_unary_pattern
...
Closes 51915
Change-Id: I378f66d70c083dd5852a9c8a04e3ddf59aff66d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292981
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2023-04-03 20:56:10 +00:00
Konstantin Shcheglov
db0dfec609
Issue 51893. Report PATTERN_NEVER_MATCHES_VALUE_TYPE in some cases.
...
Bug: https://github.com/dart-lang/sdk/issues/51893
Change-Id: Ia7582df3942a077e81f0343e83359c303d152b1b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2023-04-03 20:31:45 +00:00
Konstantin Shcheglov
bb85a2d183
Fix for UNNECESSARY_WILDCARD_PATTERN
...
Change-Id: I0afbfdf60d03019b781b6634623565b6b2477dda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2023-04-03 20:18:25 +00:00
Konstantin Shcheglov
7f9ec2513a
Fix for LintNames.type_literal_in_constant_pattern
...
Change-Id: I44bc36da4176f6e7cca74b7d0273807734b31a59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292921
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2023-04-03 19:51:52 +00:00
Konstantin Shcheglov
fabe2af5e3
Issue 51762. Update CompletionResponsePrinter sorting.
...
Bug: https://github.com/dart-lang/sdk/issues/51762
Change-Id: I46019bea72ac1656c97acb9da88da7dc577d8ef5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292640
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2023-04-03 19:07:34 +00:00
Danny Tuppeny
f1007d4aa2
[analysis_server] Prevent switch-expression snippets showing up in patterns
...
+ don't assume a semicolon on the end of a switch expression.
Change-Id: Ie141996bc79e3764c70dea66f570ca17046eecdf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2023-04-03 17:34:41 +00:00
Paul Berry
8d16c1dc87
Patterns parsing: improve error recovery for late in patternVariableDeclaration.
...
Bug: https://github.com/dart-lang/sdk/issues/50035
Change-Id: Id706ff0afab3f14d817fbf99112f772d1f1f7817
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292800
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2023-04-03 15:04:07 +00:00
Paul Berry
d2df7ce24a
Update comments and readmes to specify dart run --no-pub when necessary.
...
Now that https://dart-review.googlesource.com/c/sdk/+/291500 has
landed, `dart run` now tries to invoke `dart pub` before execution.
This doesn't work when running scripts inside the SDK, because the SDK
doesn't use pub to get its dependencies. So scripts in the SDK now
need to be run with `--no-pub`.
Change-Id: Ic320b717b2d45278cd26d373ae0823c2935ce102
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292720
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2023-04-03 12:11:49 +00:00
Brian Wilkerson
49263509a9
Update the quick fix status file
...
Change-Id: I6f4040ff9b05c1edda658673dd190789b965a543
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292700
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2023-04-03 04:13:40 +00:00
Konstantin Shcheglov
30a8b2ee4b
Use raw strings for assertResponse() that don't do any interpolation.
...
We use this pattern to find expectations to update.
Change-Id: Ibae370cfdf85dd83122b5571f3a05d86355c647f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290344
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2023-04-02 00:33:28 +00:00
Brian Wilkerson
40fd297793
Extend MakeFinal to support pattern variable declarations
...
Fixes 51872
Change-Id: I517eddd8c716ae14a023d483d03c29e99d2d8ebb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292400
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2023-03-31 23:37:52 +00:00
Janice Collins
27d6918ab9
Update for vscode only and latest version of unified_analytics for
...
analysis server.
Change-Id: I6a5e8a4424ccdf8a40c08a3cd2d697c2108422e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292201
Commit-Queue: Janice Collins <jcollins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Keerti Parthasarathy <keertip@google.com >
2023-03-31 22:17:14 +00:00
Paul Berry
d2184a9d03
Patterns parsing: disallow unaryPattern or relationalPattern in unaryPattern.
...
The precedence-based pattern parser can understand a unary pattern
inside another unary pattern (e.g. `_ as int as num`) or a relational
pattern inside a unary pattern (e.g. `> 1?`), but the specification
prohibits these constructions because they're difficult to read and
not very useful.
This change updates the implementation to match the spec, by producing
the appropriate error. The offset and length of the error cover the
inner pattern, so it should be easy to construct an analysis server
quick fix that inserts the necessary parentheses.
Bug: https://github.com/dart-lang/sdk/issues/50035
Change-Id: I33e74d6d1f863e7162851d26fefbacd4fd17277c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292120
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2023-03-31 16:43:01 +00:00
Brian Wilkerson
39c9220927
Add a fix to replace an empty map pattern
...
Change-Id: If4544e6f33d96ad9e5a8790de1211a15befc64b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292284
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2023-03-31 16:30:22 +00:00
Sam Rawlins
44b8ccdde6
Report when a @reopen annotation is invalid
...
A `@reopen` annotation is invalid when it annotates a declaration which
does not reopen anything.
Fixes https://github.com/dart-lang/sdk/issues/51592
Also cleaned up some code around reporting other invalid annotations.
Change-Id: I5add39cf2ef553a3441d39dfc47bcd1ffdbeb8ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292140
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Kallen Tu <kallentu@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2023-03-31 16:11:27 +00:00