Konstantin Shcheglov
d333e264e8
Elements. Migrate InstantiatedExtensionWithMember and related.
...
Change-Id: I1f0648ff0f16387d81e5eea9d82d2d4efe0c6a9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405660
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2025-01-23 17:00:31 -08:00
Konstantin Shcheglov
8bbe6fbdfe
Elements. Report analyzer_use_new_elements without any txt file, add file ignores.
...
Change-Id: I13125f93a6633563ed6853a622bd9fec045bfc0c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403923
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2025-01-10 15:20:59 -08:00
Konstantin Shcheglov
91db72c394
Elements. Migrate GetterSetterTypesVerifier.
...
Change-Id: Ia568507df7c7c02df6706d4ff42c4b9f489f479a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/395044
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-11-14 02:50:23 +00:00
Sam Rawlins
998cd101b8
analyzer: Correct comment references in some source files
...
This corrects about 40 of 220 comment_references issues in the analyzer
package.
In correcting the `experimentStatusToStringList` function, I see that
it is unused.
Change-Id: I0c2ec602262121337e7305797596fac9df987973
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/392243
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2024-10-29 21:38:34 +00:00
Konstantin Shcheglov
cf1f2e53a3
Breaking changes for analyzer version 7.0.0
...
Change-Id: Id6e329c7665d1dca1920d744dd7d0e9722da768c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311461
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2024-10-21 21:32:28 +00:00
Sam Rawlins
9baaa5f141
Reland "analyzer: Write out qualified extension names in error messages"
...
This is a reland of commit 10c1d883df
This includes a fix in listener.dart to not null-assert on an
element's name (`element.name!`). This fixes a problem in google
internal code.
Original change's description:
> analyzer: Write out qualified extension names in error messages
>
> Fixes https://github.com/dart-lang/sdk/issues/56269
>
> Change-Id: I025966fd4aa3d7c5b71175321f21f95e8c41f086
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388580
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
> Commit-Queue: Samuel Rawlins <srawlins@google.com >
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Change-Id: I6c20cf023af26b2d3b0fe9d8193f5e067719da8a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/389587
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2024-10-11 20:08:31 +00:00
Alexander Thomas
d4aa30a3ba
Revert "analyzer: Write out qualified extension names in error messages"
...
This reverts commit 10c1d883df .
Reason for revert: g/dart-sdk-rolls/MOLCzv4S-kQ
Original change's description:
> analyzer: Write out qualified extension names in error messages
>
> Fixes https://github.com/dart-lang/sdk/issues/56269
>
> Change-Id: I025966fd4aa3d7c5b71175321f21f95e8c41f086
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388580
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
> Commit-Queue: Samuel Rawlins <srawlins@google.com >
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Change-Id: I613695e90c96e5ffdb4dc56e729dc34be385f5fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388823
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Auto-Submit: Alexander Thomas <athom@google.com >
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Alexander Thomas <athom@google.com >
2024-10-08 15:07:38 +00:00
Sam Rawlins
10c1d883df
analyzer: Write out qualified extension names in error messages
...
Fixes https://github.com/dart-lang/sdk/issues/56269
Change-Id: I025966fd4aa3d7c5b71175321f21f95e8c41f086
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388580
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2024-10-07 18:01:54 +00:00
Konstantin Shcheglov
e41b531a59
CQ. Deprecate 'reportErrorForName', use 'atConstructorDeclaration' instead.
...
Change-Id: Ife3cdfd53551f12aa1b0dc6a223ae91e248ed33e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383444
Reviewed-by: Keerti Parthasarathy <keertip@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-09-03 20:22:37 +00:00
Konstantin Shcheglov
30b3f9d0a6
CQ. Deprecate 'reportErrorForSpan', use 'atSourceSpan' instead.
...
Change-Id: I4324154842ec462acbdda49e09d1a74f147c56f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383443
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Keerti Parthasarathy <keertip@google.com >
2024-09-03 20:14:34 +00:00
Sam Rawlins
0e39ed67e6
analyzer: Expose LintCode as public API, for plugins
...
Work towards https://github.com/dart-lang/sdk/issues/50986
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: Ie5783240e3fc2c9f8076b3efb13f79a3b8fa5000
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/375060
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2024-07-09 22:16:00 +00:00
Konstantin Shcheglov
b4e30d1b45
CQ. Deprecate unused static members of AnalysisError.
...
Change-Id: I46e76defbc9a833a867cc3fa2154635f71a6d085
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371422
Reviewed-by: Sam Rawlins <srawlins@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-06-13 23:39:21 +00:00
Konstantin Shcheglov
31a4bb7f60
DevX. Issue 22915. Show instantiated type alias in diagnostics.
...
Bug: https://github.com/dart-lang/sdk/issues/22915
Change-Id: I733bcb6021a167825840027df371fd22cfc71ce3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370701
Reviewed-by: Sam Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-06-10 21:19:08 +00:00
Sam Rawlins
cf9a8bb532
analyzer: Move DartLinter to linter package's 'test_utilities'
...
And rename it to TestLinter.
We also get to remove `LintRule._locationInfo`,which was _only_ used
for testing pubspec-oriented rules.
This DartLinter class is only used in tests and tools of the linter
package, so it's good to move it out of analyzer lib/.
In order to remove `LintRule._locationInfo`, we move the singular
package_names test case to be a reflective test.
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: I97b5e79daa07eb3942f5444502473a4ec1e9daf0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369562
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2024-06-04 17:13:49 +00:00
Konstantin Shcheglov
4f6cca1e1e
CQ. Extract package:analyzer/error/error.dart library cycle.
...
By removing unnecessary references to higher level libraries we
can extract a separate 19 libraries cycle, related to errors. Maybe
later we can break it further.
This reduces the mono-cycle from 295 to 270 libraries.
Change-Id: Id9db12002dba10788b65262d3d7325ad6079ceff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-05-31 20:22:28 +00:00
Konstantin Shcheglov
053fcb92c7
CQ. Make atEntity() consistent - use required target and 'errorCode' formal parameters.
...
Change-Id: I17defde653f41e83c0ff054a4a498a0dacaccd08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366887
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
2024-05-17 00:12:23 +00:00
Paul Berry
261e1181be
Stop creating synthetic identifiers to use as error nodes.
...
By changing the type of error nodes to SyntacticEntity, we can use
Token objects directly as error nodes, rather than having to wrap them
in synthetic identifiers.
Change-Id: I29c2fec7007766b8bc6103da835093ea326e939b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366420
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2024-05-14 21:01:11 +00:00
Konstantin Shcheglov
f9d4df6331
CQ. Enable avoid_redundant_argument_values in analyzer/
...
Change-Id: I8e5f5f6629249d1fdfddcfe87d20680b37198765
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353804
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2024-02-26 19:55:13 +00:00
Konstantin Shcheglov
bd38fbada4
CQ. ErrorReporter, use atOffset() instead of reportErrorForOffset()
...
Change-Id: I506f71d1e7aa95f1c62fca1746e4a86c78720336
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353782
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Keerti Parthasarathy <keertip@google.com >
2024-02-22 19:51:39 +00:00
Konstantin Shcheglov
106db0d7b4
CQ. ErrorReporter, use atElement() instead of reportErrorForElement()
...
Change-Id: Ife5f6d04ee7c15e7703db3ad81eb7707c7f00ceb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352053
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-02-13 17:16:07 +00:00
Konstantin Shcheglov
14a1045f16
Legacy. Deprecate 'withNullability' in getDisplayString() methods.
...
Change-Id: I688f230f4189cd1fc600e4d34f07f339111c382d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350645
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-02-07 01:25:38 +00:00
Konstantin Shcheglov
9cca4a1c5e
ErrorReporter. Use 'contextMessages' name.
...
This parameter used to be positional, so name did not matter.
But now it dos.
Change-Id: I1c76c2a3958523299ff9361d299fa449eace9441
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350161
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-02-05 17:24:28 +00:00
Konstantin Shcheglov
2a88162b84
ErrorReporter. Use atNode() instead of reportErrorForNode().
...
Change-Id: I118fb7623d3effc3bf4bebdeb586196659e8da88
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349630
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-02-02 01:56:59 +00:00
Konstantin Shcheglov
79cd9a6655
ErrorReporter. Add atToken(), atOffset(), atNode(); use atToken()
...
We discussed this some time ago, and I found another place where
I would like to report at a `SyntacticEntity`. So, if I'm going to
add something, I can just as well make `ErrorReporter` better.
Change-Id: I46d99e8959c7a5fd700cc2cba775114bfefec04d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349709
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-02-01 22:32:27 +00:00
Konstantin Shcheglov
3ea570739d
Legacy. Deprecate 'isNonNullableByDefault' in ErrorReporter constructor.
...
Change-Id: Ia05e113115fb29b47ba12fc9bf46c1d4c04721b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349463
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-02-01 01:51:48 +00:00
pq
fe6950eceb
enable flutter_style_todos
...
Change-Id: Ic82963b754404d54e37f5fb03819aebc3fa67954
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336502
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
2023-11-15 23:04:19 +00:00
Sam Rawlins
73ab31b98a
analyzer: Move the Source class to be public API.
...
Deprecate accessing LineInfo, Source, or SourceRange via the
old library (pkg/analyzer/lib/src/generated/source.dart).
Migrate all SDK code to the new library.
Fixes https://github.com/dart-lang/sdk/issues/46420
Change-Id: Ic7c98a5820415c92a457f9fa2756351b05520cd1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335382
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2023-11-14 17:10:37 +00:00
Konstantin Shcheglov
4f7295ad26
Record elements and types parts of missing patterns for AddMissingSwitchCases fix.
...
Bug: https://github.com/dart-lang/sdk/issues/51985
Change-Id: I48e04e992ccab5cb5dedb5df328ba13ffcf6b560
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302200
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2023-05-09 16:29:20 +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
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
Ahmed Ashour
bea7045517
[analyzer] add failing test case
...
Bug #50496
Change-Id: Iaa6007af1b9dbbf7bac3f2ad835dece3eb64b189
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271520
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2022-12-05 17:37:43 +00:00
Ahmed Ashour
0b5d908221
[analyzer] NOT_ENOUGH_POSITIONAL_ARGUMENTS
...
To report at the token of the expected positional argument
Fixes #50127
Change-Id: I5eb31c6d354fb15d482c2046f7faaa4505658f4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262603
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-10-11 17:56:11 +00:00
Brian Wilkerson
38581783e6
Generate the list of error codes
...
Change-Id: I315619a30ac8690e90be2b3a3ad7d849c28f2c05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263441
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-10-10 17:26:00 +00:00
Konstantin Shcheglov
8d1297628a
More tests for ExtractorPattern resolution, report errors.
...
Change-Id: I800f909a1d58e8bebcbfa30e52f09a16906b1e07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263142
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2022-10-07 18:35:35 +00:00
Konstantin Shcheglov
5ef329cf74
Report CompileTimeErrorCode.DUPLICATE_VARIABLE_PATTERN
...
Change-Id: I07cb697c9c517f0d4eb67100f0ae134aa821d25d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263002
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2022-10-07 00:16:27 +00:00
Konstantin Shcheglov
57a619bcb7
Report diagnostics for relational patterns.
...
Change-Id: I1a3e02e36679599e0240f74108a5e91db6269b1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262900
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2022-10-06 16:33:41 +00:00
Jens Johansen
e860cf241b
[parser] Empty record
...
https://github.com/dart-lang/language/pull/2535
Change-Id: I8241119ee858ce39673472056b88c9393799e1a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262600
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2022-10-06 06:34:58 +00:00
Konstantin Shcheglov
683e2419da
Deprecate 'DartType.element2' use 'element' instead.
...
Change-Id: I6986a058616db489987789cfab09d53a450e3ab5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262666
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2022-10-05 16:30:09 +00:00
Sam Rawlins
15be61ed9a
Remove INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES warnings
...
Fixes https://github.com/dart-lang/sdk/issues/49112
It was decided to remove the "override with equal default value"
restriction both for null safe code, and for pre-null safe code.
CFE had never issued this static warning, and her we remove it from
analyzer.
Change-Id: I1244e4fe46da8bb4bd8c3a77ec8beb95811e30a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262267
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2022-10-04 18:23:10 +00:00
Ahmed Ashour
6da33ae60f
[analyzer] add HintCode.DUPLICATE_EXPORT
...
Fixes #49439
Change-Id: I511205c6b0960f6b19a2ac45211bc1348568f52c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260703
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-10-03 23:22:18 +00:00
Konstantin Shcheglov
c73228abaf
Report an error when a variable pattern binds in one branch of logical-or, but not in another.
...
Only check for if-case is implements for now.
Change-Id: I57d1b8b33fbe2bf7adc848b5d607ff99b878b479
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262101
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2022-09-30 18:53:26 +00:00
Konstantin Shcheglov
e03170035a
Deprecate 'get name2', use 'get name' instead.
...
Change-Id: Iee8ef5fb6700d96c857a22a99dc61dac3da88572
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260443
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2022-09-22 02:22:47 +00:00
Konstantin Shcheglov
1aa398d4be
Report EXPECTED_NAMED_TYPE_X when not a NamedType is parsed.
...
Change-Id: Ibebc276777075da12e36642f08291fa9a9f9ac91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260073
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2022-09-21 02:24:45 +00:00
Ahmed Ashour
63f69b4756
[analysis_server] add a quick fix for some AnalysisOptionsHintCode
...
Fixes #49513
Change-Id: Ib4a1b68c95c2f379e8cbdaf62b2b17bf0a25e7b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252580
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2022-09-06 18:26:46 +00:00
Ahmed Ashour
17e0f87252
[analyser] add MISSING_DEFAULT_VALUE_FOR_PARAMETER_POSITIONAL
...
Fixes #49816
Change-Id: I48f3c21fcf552e21da70cf12adf3671c3f490695
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256840
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2022-08-30 20:55:38 +00:00
Jens Johansen
cec94a1446
[parser] Empty record types, record types with 1 element
...
This should bring parsing of record types up-to-date with v1.6 of
https://github.com/dart-lang/language/blob/master/working/0546-patterns/records-feature-specification.md
Also fixes https://github.com/dart-lang/sdk/issues/49826
Change-Id: I3737a72ddee49a957bd55f86cc200fb77f23e2a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256660
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2022-08-30 11:04:10 +00:00
Jens Johansen
a4352d09e1
[parser] Record literals can be const and one-element only
...
This should bring parsing of record literals up-to-date with v1.6 of
https://github.com/dart-lang/language/blob/master/working/0546-patterns/records-feature-specification.md
Change-Id: If39bb1834137da55ef8bd1923106bbc614ea319b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256461
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2022-08-30 10:54:08 +00:00
Brian Wilkerson
9d1a877082
Generate diagnostics for invalid field names in record literals
...
Change-Id: I12ece78e257b1265d86114e8c17e6a8c641559e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256364
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-08-25 17:47:06 +00:00
Brian Wilkerson
2b27d3257b
Report duplicated field names in record literals
...
Change-Id: Ifc5c3a06c7f489b00421f5b1af47df52615694d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256200
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2022-08-24 16:33:49 +00:00
Sam Rawlins
4fcbbb107a
Add CAST_FROM_NULL_ALWAYS_FAILS check
...
Fixes https://github.com/dart-lang/linter/issues/3605
Change-Id: I5f9a2b127173aa9f2cc6f8fcee9c93e96cb63663
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255149
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2022-08-16 23:41:02 +00:00