Commit Graph

8489 Commits

Author SHA1 Message Date
Konstantin Shcheglov 694c8d0d6b Update UP for FutureOr.
Bug: https://github.com/dart-lang/sdk/issues/43720
Change-Id: I9decd3a3b430f82e3e4bd0c4e6963cd3069f9adf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166786
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-09 00:00:55 +00:00
Konstantin Shcheglov 63e0cd6955 Issue 43717. Update UP(FunctionType, unrelated) to UP(Object, unrelated).
Bug: https://github.com/dart-lang/sdk/issues/43717
Change-Id: Ib2fa861df24d010c768e4a06ba2bff175bbf88f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166783
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-08 23:42:45 +00:00
Paul Berry 2601fa6d78 Ensure that && and || expressions promote properly in unreachable code.
Bug: https://github.com/dart-lang/sdk/issues/40009
Change-Id: Ib06449624de9320f5229957511ebaaee92c75ec8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166606
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-10-08 21:42:14 +00:00
Konstantin Shcheglov 132e2307e7 Report MAIN_FIRST_POSITIONAL_PARAMETER_TYPE
Bug: https://github.com/dart-lang/sdk/issues/43555
Change-Id: Ieacc710f1da1d92ab99337c6511a6b994e9bc0da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166780
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-10-08 19:59:19 +00:00
Konstantin Shcheglov 0c342ae491 Fix crash when invalid default field formal parameter has annotation.
Change-Id: Iabb329f850195be981d80b0589d9f7851596c680
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166740
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-08 15:17:05 +00:00
Konstantin Shcheglov 103465c90c Report MAIN_HAS_MORE_THAN_TWO_REQUIRED_POSITIONAL_PARAMETERS and MAIN_HAS_REQUIRED_NAMED_PARAMETER.
Bug: https://github.com/dart-lang/sdk/issues/43559
Change-Id: If74634187d411c0b008133b59c1c3e23e87319c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166309
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-10-08 00:05:16 +00:00
Konstantin Shcheglov 4f760fa268 Store declared elements into linked nodes, get from them.
The previous approach was reverted.

Change-Id: Ib4b9d09d740511cd2ef76d663412a3358c7f666d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166400
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-10-07 22:51:43 +00:00
Paul Berry 57932cfb4f Ensure that conditional expressions promote properly in unreachable code
Change-Id: I8680b81b44be789a047238b1e2d008ff240e59c2
Bug: https://github.com/dart-lang/sdk/issues/40009
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165405
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-10-07 18:16:52 +00:00
Paul Berry ed2f45d56d Ensure that if statements promote properly in unreachable code
Bug: https://github.com/dart-lang/sdk/issues/40009
Change-Id: I04a5af558bb70b861d92b5379a8fb84489d5c9f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165402
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-10-07 15:32:25 +00:00
Paul Berry e933e91aaa Reland "Flow analysis: promote to non-nullable on initialization"
This is a reland of 6a1c54ec30

Original change's description:
> Flow analysis: promote to non-nullable on initialization
>
> When flow analysis encounters a variable declaration of the form `T? x
> = expr;`, if the type of `expr` is `T`, then the variable is
> immediately promoted to type `T`.
>
> Fixes #43099.
>
> Change-Id: Ia206fe0d50e2fdd9bdf637e13c85633d8490dbcc
> Bug: https://github.com/dart-lang/sdk/issues/43099
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163841
> Commit-Queue: Paul Berry <paulberry@google.com>
> Reviewed-by: Bob Nystrom <rnystrom@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>

Bug: https://github.com/dart-lang/sdk/issues/43099
Change-Id: I7530bb0f7c24674a7b500558b89d50b35e045aca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166305
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-10-07 13:14:55 +00:00
David Morgan 0efbb96545 Revert "Return declared elements for linked AST nodes."
This reverts commit 706ab39eba.

Reason for revert: Analyzer crash b/170276354

Original change's description:
> Return declared elements for linked AST nodes.
>
> For now only top-level nodes and elements, will do class members later.
>
> These changes would be useful to fix matching elements and nodes, e.g.
> https://github.com/dart-lang/sdk/issues/43153 or https://bit.ly/3jCfhVx
>
> Change-Id: I37861ba60b4e70f637019bf4f8a4d0d007c97965
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166200
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>

TBR=scheglov@google.com,brianwilkerson@google.com,srawlins@google.com

Change-Id: I0b13f9e4fbecf9cb0e4d059580837f79bd1cf2b2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166381
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2020-10-07 07:33:00 +00:00
Konstantin Shcheglov d758af07b5 Several changes to Cider library context.
I'm still not able to reproduce the "Missing library" issue.
But I making several changes that might help.

Change-Id: Ieed6f14351a109565d20019deae6bf6e72e78112
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166306
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-06 23:10:26 +00:00
Konstantin Shcheglov 706ab39eba Return declared elements for linked AST nodes.
For now only top-level nodes and elements, will do class members later.

These changes would be useful to fix matching elements and nodes, e.g.
https://github.com/dart-lang/sdk/issues/43153 or https://bit.ly/3jCfhVx

Change-Id: I37861ba60b4e70f637019bf4f8a4d0d007c97965
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166200
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-06 22:08:53 +00:00
Sam Rawlins 19ada0706e Report indirectly exporting @internal typedef
This type of exposure was brought up by Lasse at https://github.com/dart-lang/sdk/commit/afbb8f9063eaabf80fd3dfcd67ff2d3c07be2395#r42686423.

New "Indirect exposure" section in the doc: https://docs.google.com/document/d/130E4qfsjqRWtSNpIoNM628zVwGP-8W4J1P7W3wzJG8c/edit#

Change-Id: If38889b2134719804aa8cbaf613c8eb33cb6d949
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-10-06 21:58:23 +00:00
Sam Rawlins 1df5c58d29 Analyzer: Move MustCallSuperVerifier to its own library
This will make it easier for upcoming bug fixes. Calling this verifier
in BestPracticesVerifier means it will only be run when hints are
enabled, perhaps boosting performance.

Also add a few more test cases.

Change-Id: If22ab02313d9f98f067ad4325b2f5ac473f4862c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164580
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-10-06 20:15:33 +00:00
Keerti Parthasarathy 168b7201d2 Fix finding third party analysis options.
Change-Id: If6792018fa9a4a64316be034dfa4b6e14c2e03d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166124
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2020-10-05 22:55:53 +00:00
Brian Wilkerson 8967e3b85b Fix the offsets for diagnostics produced while validating analysis options files
Change-Id: I1417be1e77738b19728546c5caa449ae2e0e54c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165980
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-10-05 15:59:26 +00:00
pq 71d2e6de69 lint diagnostic reporting for pubspecs
See: https://github.com/dart-lang/sdk/issues/43529

Change-Id: Iaf05102b3f6473913d900286c31779cdb1d59926
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164249
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-10-05 15:35:25 +00:00
Konstantin Shcheglov d03dd09e0f Report CompileTimeErrorCode.MAIN_IS_NOT_FUNCTION
Bug: https://github.com/dart-lang/sdk/issues/43557
Change-Id: I773cd09a164c37444b9765ebc445477467bb7665
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165960
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-04 17:25:51 +00:00
pq 1ee70ab86c check sub-expressions for @doNotStore
Change-Id: I3a54b3e84cb9f87ad7aefe5fc917bc0b6c890dc3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165921
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-10-04 14:58:21 +00:00
Konstantin Shcheglov 090166c79d Report CompileTimeErrorCode.UNDEFINED_IDENTIFIER read in compound assignment.
Bug: https://github.com/dart-lang/sdk/issues/42704
Change-Id: Ibf9557c97a05229151254ad0d33ecf27764dce7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165941
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-03 16:32:01 +00:00
Konstantin Shcheglov ba9355624c Issue 1182. Use the initial type for extension instantiation.
Bug: https://github.com/dart-lang/sdk/issues/43590
Bug: https://github.com/dart-lang/language/issues/1182
Change-Id: I80366ad4f777eec299143a002bbdc9d92ba61a5b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160883
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-10-02 23:44:41 +00:00
Konstantin Shcheglov 3a59eafbe5 Include promotedBound into the TypeParameterType display string.
Change-Id: I7d34a041559875d34a66de4504b8df1b57497e55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165684
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-02 18:42:21 +00:00
Konstantin Shcheglov 3698091858 Use demoteType() on inferred type arguments.
Bug: https://github.com/dart-lang/language/issues/1182#issuecomment-702272641
Change-Id: I72d30f51aaf1d2651c1568cd68f37e5c7c03b582
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165683
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-01 22:22:47 +00:00
Clement Skau b4f49dc255 Revert "Flow analysis: promote to non-nullable on initialization"
This reverts commit 6a1c54ec30.

Reason for revert: Triggers test failure:
https://ci.chromium.org/p/dart/builders/ci.sandbox/vm-kernel-precomp-linux-debug-x64/8247

Original change's description:
> Flow analysis: promote to non-nullable on initialization
>
> When flow analysis encounters a variable declaration of the form `T? x
> = expr;`, if the type of `expr` is `T`, then the variable is
> immediately promoted to type `T`.
>
> Fixes #43099.
>
> Change-Id: Ia206fe0d50e2fdd9bdf637e13c85633d8490dbcc
> Bug: https://github.com/dart-lang/sdk/issues/43099
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163841
> Commit-Queue: Paul Berry <paulberry@google.com>
> Reviewed-by: Bob Nystrom <rnystrom@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>

TBR=paulberry@google.com,scheglov@google.com,rnystrom@google.com,johnniwinther@google.com

Change-Id: I8549b48a734f527194ce11d82235b9d5c6e58185
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/43099
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165564
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2020-10-01 08:41:15 +00:00
Konstantin Shcheglov 6a92616f52 Issue 43175. Report IMPLICIT_THIS_REFERENCE_IN_INITIALIZER in AssertInitializer.
Bug: https://github.com/dart-lang/sdk/issues/43175
Change-Id: I23ae1c8d6177e99e634d3b05236c5787a3a95b5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164901
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-01 02:02:31 +00:00
Paul Berry 6a1c54ec30 Flow analysis: promote to non-nullable on initialization
When flow analysis encounters a variable declaration of the form `T? x
= expr;`, if the type of `expr` is `T`, then the variable is
immediately promoted to type `T`.

Fixes #43099.

Change-Id: Ia206fe0d50e2fdd9bdf637e13c85633d8490dbcc
Bug: https://github.com/dart-lang/sdk/issues/43099
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163841
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-10-01 01:15:31 +00:00
pq 0195f4850b cache doNotStore state
Change-Id: I74a0e6a9bb3bae23bd3e30b492481761407657ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165147
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-09-30 13:50:14 +00:00
Brian Wilkerson 597588f698 Make additional requested changes to the diagnostic documentation
Change-Id: I30b1f44c957b0f7bc4d629e62e0d9aeca7560203
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165001
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-09-29 19:42:07 +00:00
Konstantin Shcheglov 2b246127f7 Prepare to publish analyzer 0.40.4 and _fe_analyzer_shared 11.0.0.
Change-Id: I19d92bf9f107a82826c2d6d41f18315f25afc411
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165040
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-29 18:46:27 +00:00
Konstantin Shcheglov 8de1bc0a07 Stop using getReadType() in nnbd_migration.
The packages 'analyzer' and 'nnbd_migration' tightly depend on each
other via MigrationResolutionHooks. I will publish analyzer 0.40.4
shortly after this CL lands.

Change-Id: I6f5e51f88e0020a1674ffb251712658e896170e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164900
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-09-29 17:18:25 +00:00
Keerti Parthasarathy b8909a4878 Replace CiderMemoryByteStore with CiderCachedByteStore.
Change-Id: I6301cfbbaa4a65b5f1d326174879ebddff14cc98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164662
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2020-09-29 00:46:18 +00:00
Konstantin Shcheglov 499bae02e0 Issue 34699. Use type parameter variance when instantiate to bounds.
Bug: https://github.com/dart-lang/sdk/issues/34699
Bug: https://github.com/dart-lang/sdk/issues/43524
Change-Id: I8fe14c59fff17f3e4ebee62fbd7be2b45172a595
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-28 23:25:58 +00:00
Konstantin Shcheglov 31e673d80c Deprecate SimpleIdentifier.auxiliaryElements
Change-Id: Ie1e92cc61b7018d503cdf44c37611ea55b4b5391
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164760
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-28 16:00:44 +00:00
Paul Berry 0176a3d4c5 Fix flow analysis handling of late variables with initializers.
A late variable with an initializer is very similar to a function
expression, in that it may be evaluated at any time in the future
(possibly more than once, if it throws an exception), so flow analysis
models it that way.

Fixes #42990.

Change-Id: I90ed00c8fd7388145f89011628e31ff7e85a5c43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164420
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-09-28 14:40:02 +00:00
Konstantin Shcheglov ffbe30f890 Deprecate IndexExpression.auxiliaryElements
Change-Id: I7359527db5bbf161a35296678ff2bd43052c1794
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164740
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-27 18:28:46 +00:00
Konstantin Shcheglov 6fce77010a Remove unnecessary getStaticType().
Change-Id: Ic727d2607999aa97a290345c22993cd2ba703d1a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164721
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-26 20:32:21 +00:00
Konstantin Shcheglov fe1ed1df59 Remove unnecessary _nonNullable() invocations.
We made TypeProvider legacy or null-safe long time ago, so we already
provide correct types.

R=brianwilkerson@google.com

Change-Id: I3bb7f9c6d8b2292fcb62df1820abbd84d142340d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-26 18:17:05 +00:00
Konstantin Shcheglov fc151ec027 Compute variance for type parameters of typedefs.
Bug: https://github.com/dart-lang/sdk/issues/34699
Change-Id: I30f010f89da6abb1b3d27fe1eab11d5eb1c5e190
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164660
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-25 23:32:54 +00:00
Konstantin Shcheglov f9e6e38b21 Straighten up invocation of an Object method on dynamic.
Fixes https://github.com/dart-lang/sdk/issues/39609

Change-Id: I9b98d9bff8d4e9b75ab7625323f62eb6b6701a94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164256
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-25 16:46:04 +00:00
Konstantin Shcheglov e423e857f8 Make null check to participate in null shorting.
Bug: https://github.com/dart-lang/language/issues/1163
Change-Id: I6e648f76413c5036a867b2125359f28eb03027c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163727
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-25 16:02:34 +00:00
Konstantin Shcheglov 55496a1282 Deprecate getReadType() and remove getExpressionType().
Change-Id: Ibc32afd7867f5b0f940affdaea97904c1afb194c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164361
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-25 05:05:33 +00:00
Konstantin Shcheglov 7a06bcb96e Pass TypeProvider to Member(s).
Bug: https://github.com/dart-lang/sdk/issues/43541
Bug: https://buganizer.corp.google.com/issues/169344717
Change-Id: I00b7c5308473de2bef949668c72aaad1967f199a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164462
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-25 05:03:03 +00:00
Brian Wilkerson cd897bc86c Remove the diagnostic default_value_in_function_typed_parameter
This diagnostic is obsolete because the parser also produces a
diagnostic for this situation.

Change-Id: I5c5f7fc734ddeb5cfaaba9cc9980efe174aeb4e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164461
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-09-25 04:35:53 +00:00
Brian Wilkerson 2c4bee37c0 Add documentation for some additional diagnostics
Change-Id: Ib6dc3740de759d820421fa3a899c72302de64c9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164440
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-09-25 04:35:33 +00:00
Sam Rawlins 52b0285e41 Analyzer: Gather operator super calls for mustCallSuper
Fixes https://github.com/dart-lang/sdk/issues/27896

Change-Id: I7017026346a92ffc43a3cfa506f7a257af1a3471
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164421
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-09-24 21:15:38 +00:00
Konstantin Shcheglov 578d0c081f Fix search for enums.
Bug: https://github.com/flutter/flutter-intellij/issues/4881
Change-Id: I7f474841c534891d6eb5de5e9fed07e7048e612e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164363
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-24 19:22:57 +00:00
Konstantin Shcheglov 7ec28c3f08 Enforce await_only_futures and fix violations.
R=brianwilkerson@google.com

Change-Id: Icfc093d46562ddc7084151e76f495cc1462bb900
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164257
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-24 14:28:00 +00:00
Konstantin Shcheglov 9b7c0ebd82 Extract SimpleIdentifierResolver.
The improvement is that we use PropertyElementResolver and stopped
using setReadElement() and setWriteElement().

The error reporting and type anlysis is moved as it were.

Change-Id: I808be8d0d52d4eece892be8234dd28c213dcb11c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164253
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-24 14:26:03 +00:00
Sam Rawlins e615c06c91 analyzer: Report illegal @internal usage of a library or unnamed super ctor call
Bug: https://github.com/dart-lang/sdk/issues/28066
Change-Id: Ifd7a54e590699de02d0db80d5aa38a3a0b2bce73
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164248
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-09-24 01:53:59 +00:00