Commit Graph

10502 Commits

Author SHA1 Message Date
Mike Fairhurst 000f3135a5 [analyzer] Remove unused dart:async imports
Change-Id: If21c3a30f3bc521586ad01f8f9e241038e7aa7eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161448
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-09-02 17:14:22 +00:00
Konstantin Shcheglov 01024dfa5a Issue 43200. Report ASSIGNMENT_TO_FINAL when 'final late' has an initializer.
Bug: https://github.com/dart-lang/sdk/issues/43200
Change-Id: Ib79b4e8246f8f67661212c3d107de961d72132b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161471
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-02 15:38:22 +00:00
Paul Berry ab16d79af9 Revert "Flow analysis changes to fix mixed-mode unsoundness loophole."
This reverts commit d833f2f65c.

Reason for revert: Broke build, e.g. https://ci.chromium.org/p/dart/builders/ci/dart-sdk-mac/12688

Original change's description:
> Flow analysis changes to fix mixed-mode unsoundness loophole.
> 
> This is the flow analysis portion of the fix to
> https://github.com/dart-lang/language/issues/1143.  Follow-up changes
> will be needed in the CFE and/or backends to ensure that exceptions
> are thrown under appropriate circumstances.
> 
> This CL also makes some improvements to flow analysis's reachability
> analysis so that it accounts for nullability of the target when
> analyzing the reachability of `??=` and `?.`.  Hopefully these
> improvements should make the fix to
> https://github.com/dart-lang/language/issues/1143 clearer and more
> consistent.
> 
> Change-Id: I5fa5c070f13fd57ac4c2fb87f2d67588861594b0
> Bug: https://github.com/dart-lang/language/issues/1143
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160440
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Commit-Queue: Paul Berry <paulberry@google.com>

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

Change-Id: If1215b19975e0958d612dd69767088095d853879
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/language/issues/1143
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161580
Reviewed-by: Paul Berry <paulberry@google.com>
2020-09-02 15:02:46 +00:00
Paul Berry d833f2f65c Flow analysis changes to fix mixed-mode unsoundness loophole.
This is the flow analysis portion of the fix to
https://github.com/dart-lang/language/issues/1143.  Follow-up changes
will be needed in the CFE and/or backends to ensure that exceptions
are thrown under appropriate circumstances.

This CL also makes some improvements to flow analysis's reachability
analysis so that it accounts for nullability of the target when
analyzing the reachability of `??=` and `?.`.  Hopefully these
improvements should make the fix to
https://github.com/dart-lang/language/issues/1143 clearer and more
consistent.

Change-Id: I5fa5c070f13fd57ac4c2fb87f2d67588861594b0
Bug: https://github.com/dart-lang/language/issues/1143
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160440
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-09-02 14:27:52 +00:00
Konstantin Shcheglov c781fa474c Prepare to publish analyzer 0.40.2
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I44cfccc3258a7df6e7d13ba71eab56134229996a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161446
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-02 01:45:31 +00:00
Konstantin Shcheglov d9b874c4b5 Resolve AssignmentExpression with SimpleIdentifier directly.
Change-Id: I81cc3d6b1cf31d840727300c0a22e8acfa5bf17c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161261
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-01 22:15:41 +00:00
Konstantin Shcheglov ebc055b4d2 Prepare to publish analyzer 0.40.1 and _fe_analyzer_shared 9.0.0.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I2cf281ef7a3238e0313b6ab7aa9634278f72f122
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-01 22:04:12 +00:00
Konstantin Shcheglov 6bc244a821 Issue 42605. Infer mixins using interfaces merging.
Bug: https://github.com/dart-lang/sdk/issues/42605#issuecomment-683102281
Change-Id: I3f9ed71cec3ebb0bf954f6185917a60d71a016ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161322
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-01 22:04:11 +00:00
Konstantin Shcheglov c43de3eeed Move the test for TokenType.GT_GT_GT into the main AnalysisDriverResolutionTest.
We can now enable experiments for individual test methods.

R=brianwilkerson@google.com

Change-Id: I9d13c8774bd550efc3436a3480b6d40c20d1564d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161442
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-01 21:31:34 +00:00
Brian Wilkerson 3c88ea866f Unify two error codes for documentation purposes
Change-Id: I793d761f705ae1818ae8cc298b1f6077e1b9b9ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161344
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-09-01 18:48:59 +00:00
Konstantin Shcheglov 213bffcde2 Issue 43269. Fix for crash for 'Ext(a) == b'.
Bug: https://github.com/dart-lang/sdk/issues/43269
Change-Id: Iead082c906057b00a5c1a02860e2ffa8620eadab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-01 15:54:29 +00:00
Jens Johansen 3a1f732c0f [parser] Make begin/end events always come in pairs
This CL:
* Changes the events so beginX and endX events always comes in pairs
  (though technically not right as some specific events can be beginX
  endY --- but in those cases it is at least documented and used in code
  that actually tests it).
  -> This entails adding some events and converting something from
    "beginX" to "handleX" instead.
* Adds a utility that can generate an AST of sorts directly from the
  parser via a listener using the begin/end matching (and knowing of the
  specific ones that doesn't match directly).
* Adds a test that checks that - at least for all tested (50,000+) files
  - the AST actually generate "correctly", i.e. matches up begin/ends
  and ends up with a single top entry "CompilationUnit".
* Adds a different visualization to the parser listener events by
  displaying the "AST directly from the parser" in a UI that can be
  navigated. The visualization may not be the best, but it's certainly
  a stepping stone.

Change-Id: I9b27f7bbf3be442adc92f357c7b3c46da6f84cf7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159664
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-01 09:30:43 +00:00
pq f5a0e185d2 invalid @doNotStore assignment analysis
Another pass at https://dart-review.googlesource.com/c/sdk/+/159841 (reverted) with a guarding type-check.



Change-Id: Ia270be4e880d71642a96c5ab93a306efba1ceedb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160961
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-01 02:38:17 +00:00
Konstantin Shcheglov 69387f9d93 Issue 43268. Report warnings for Ext(c)?.foo() when 'c' is non-nullable.
Bug: https://github.com/dart-lang/sdk/issues/43268
Change-Id: I8b36e3e112eb91dc5d56e98f657f2c77bf761ada
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161143
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-31 22:05:30 +00:00
Konstantin Shcheglov 58ff2d0fe0 Change AssignmentExpression tests to assertAssignment().
Change-Id: If7cbb0584bfbf248ea79fe827626f4189d2f1c39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161041
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-31 16:13:38 +00:00
Konstantin Shcheglov d45a532e7c Update isNullable() and isNonNullable() to support TypeParameterType(s) with promotedBound.
Change-Id: If5abff641631cde16d344f29ede8c2435babd32f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160941
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-28 22:39:49 +00:00
Konstantin Shcheglov 8ae9842e12 Deprecate ElementAnnotation.constantValue
R=brianwilkerson@google.com, pquitslund@google.com

Change-Id: Ifae6a614c20b703d9614d7ccc2f8b254bafcb070
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160942
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-28 21:52:19 +00:00
Konstantin Shcheglov 8812673f1b Set readElement/Type and writeElement/Type for PrefixExpression.
Change-Id: I4238b088f7ecd5779a2638c86a519d1b95a05e83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160787
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-28 18:38:28 +00:00
Konstantin Shcheglov 67c56a7ebe Update diagnostics for EXTENSION_OVERRIDE_WITH_CASCADE.
Somehow bots did not catch it.

R=brianwilkerson@google.com

Change-Id: I4fa29f662ffbf541b2fb76d3449c3e69cc1e48bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160783
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-28 15:38:28 +00:00
Konstantin Shcheglov 5f3298eeac Set readElement/Type and writeElement/Type for PostfixExpression.
R=brianwilkerson@google.com

Change-Id: I449503648192e4b2d1d65304d65a12f74d589bcc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160785
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-28 14:45:08 +00:00
Sam Rawlins 94c18e3dc5 Analyzer: Replace the use of package:html with a custom XML parser.
From the dartdoc: Android Manifest files are written in XML. In order
to validate an Android Manifest file, however, we do not need to parse
or retain each element. This parser understands which elements are
relevant to manifest validation. This parser does not validate the XML,
and if it encounters an error while parsing, no exception is thrown.
Instead, a parse result with [ParseResult.error] is returned.

Change-Id: I1aeb79f098aab2b4ca9b0ff54b027d41744c65ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160182
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-08-27 22:29:07 +00:00
Brian Wilkerson 1bbc412460 Add a method to WorkspacePackage to access the packages available to the receiver
Change-Id: Ib96e8bc05e848acda6b4c66f7080d106966e580e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160181
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-08-27 21:47:07 +00:00
Konstantin Shcheglov 59db5cfa6c Issue 43214. Report EXTENSION_OVERRIDE_WITH_CASCADE on the override.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/43214
Change-Id: I66c33e535ba4c689cb6d9171493e9605728b76cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160701
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-27 20:27:27 +00:00
Konstantin Shcheglov 893481591a Store readElement/Type and writeElement/Type in AssignmentExpression.
Change-Id: Ibe0eea6126c7e85cdfefa09652228b5a89b522cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160444
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-27 20:22:14 +00:00
Konstantin Shcheglov 2a5d17bd16 Simplify types access in AssignmentExpressionResolver
R=brianwilkerson@google.com

Change-Id: Ia5a633e65e5e5eb7697916fb9bea56abb6dc4e30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160441
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-27 14:32:57 +00:00
Jens Johansen 85699cfa6b [parser] Remove 'discardTypeReplacedWithCommentTypeAssign' from Listener
It was never called anyway.

Change-Id: I774dd6fcdaad29fe7b9ff00e70264389a7a4a31c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159662
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-08-27 11:26:17 +00:00
Paul Berry 2cb426f9fc Fix context type for compound operators.
This is partially in support of the new numeric typing rules for null
safety, however it turned out that the anaylzer wasn't setting the
context type properly even in legacy code.  I've fixed both legacy and
null safe behaviors and included tests to cover both.

Fixes #39642.

Bug: https://github.com/dart-lang/sdk/issues/39642
Change-Id: Ie4d0936d335b1f750eae4febe76f2b8879c228b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159965
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-08-26 18:21:05 +00:00
Konstantin Shcheglov a717fd41e3 Issue 42379. Allow null-shorting only for increment operators in prefix expressions.
Bug: https://github.com/dart-lang/sdk/issues/42379
Change-Id: I366702f144a4350bed6b83c5c0936359aeeae2c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159960
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-25 23:05:03 +00:00
Konstantin Shcheglov a46f6cb570 Support for SDK 2.9 and null safety.
Change-Id: I3e5cd4d8d3794c164d46c8b9eb59a376070edbd2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160143
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-25 23:03:53 +00:00
Konstantin Shcheglov 4eb310a78e Use withNullability(true) in ElementImpl.toString().
Change-Id: Ie7896e564ab5b86c6398d5d70352301319b99535
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-25 18:30:23 +00:00
Sam Rawlins 44d88979ea Analyzer: Add LanguageCode, moving implicit-dynamic codes from StrongModeCode
Change-Id: Idd787c71137b7bdee9db3168b085861bf461bfd7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159400
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-08-25 17:01:50 +00:00
Brian Wilkerson d5088c0a8f Reland the CL to "Add a hint for the new Target annotation".
This reverts commit 50946855dc.

The bug that caused dartdoc to fail has been fixed by restoring the
creation of the invalid field. An issue has been created to update the
dartdoc package to stop using the invalid field, and the field will
need to be removed after dartdoc has been updated and pulled into the
SDK.

Change-Id: Ia7e282972e541a33b379872fbcd57a137a9c8a25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160120
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-08-25 16:53:10 +00:00
Konstantin Shcheglov 5c9d9f8616 Don't report INVALID_NULL_AWARE_OPERATOR where INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER is already reported.
Change-Id: I016821804d062f8c07103d4107b88222b1e2a92e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159966
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-25 15:16:00 +00:00
David Morgan 50946855dc Revert "Add a hint for the new Target annotation"
This reverts commit 351a1cc489.

Reason for revert: caused a generator to fail, b/166257389

Original change's description:
> Add a hint for the new Target annotation
> 
> Change-Id: I5d8723eead20bb68407ce2a23e8de6cb9ae8a4de
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159921
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>

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

Change-Id: I16af4403867d31f731d1efafce2c0c2be405df9c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160102
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2020-08-25 14:20:52 +00:00
Paul Berry 9ad6149de8 Make TypeSystemImpl getters for nullable num/int/double.
Change-Id: Ic6fe64f206c3273c9e5c4a688b6a8fe32a78d1fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159963
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-08-25 03:42:08 +00:00
Paul Berry 607e7d1bf2 Null safe numbers: hook up inference rules for method calls.
Bug: https://github.com/dart-lang/sdk/issues/42629
Change-Id: Ie5603b3804af6d740dde361ee8ff2537b0f0d35c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159421
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-08-25 03:42:08 +00:00
Paul Berry 9af30dbb06 Null-safe numbers: implement inference rules, hook up for binary operators.
A future CL will hook up the inference rules for method calls (`clamp`
and `remainder`).

Bug: https://github.com/dart-lang/sdk/issues/42629
Change-Id: Iefa36a369ce11726fc316ef46ff7d9bcb0e21da1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159403
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-08-25 03:42:08 +00:00
Paul Berry 8572a26bdf Null-safe numbers: hook up static typing rules for method calls.
Bug: https://github.com/dart-lang/sdk/issues/42629
Change-Id: I0fc4d5b65d3c9494fc280b5af53d0cc065459be8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158481
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-08-25 02:54:18 +00:00
Konstantin Shcheglov 8053110035 Report ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR for 'super!'.
Partial implementation to unblock:
https://dart-review.googlesource.com/c/sdk/+/159966, to unlock:
https://dart-review.googlesource.com/c/sdk/+/159960

Bug: https://github.com/dart-lang/sdk/issues/43168
Change-Id: I5e3891f4ddf15c747568b38b794d75fcbd30c03a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159971
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-25 00:43:37 +00:00
Brian Wilkerson 351a1cc489 Add a hint for the new Target annotation
Change-Id: I5d8723eead20bb68407ce2a23e8de6cb9ae8a4de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159921
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-08-24 18:04:47 +00:00
Paul Berry 08dd4b1faa Null-safe numbers: implement static typing rules, hook up for binary operators.
Future CLs will hook up the static typing rules for method calls
(`clamp` and `remainder`) and will implement the rules for contexts.

Bug: https://github.com/dart-lang/sdk/issues/42629
Change-Id: Iccfb1fa1ac9aff6c0832d65e4835b5b9bd51a804
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158501
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-08-24 15:34:33 +00:00
Konstantin Shcheglov e868d3076c Issue 43151. Fix crash when a field shadows a super-interface method.
Bug: https://github.com/dart-lang/sdk/issues/43151
Change-Id: I27e78815007e12edfefc81b5e49eed30bb633229
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159740
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-24 14:29:24 +00:00
David Morgan a249594de9 Revert "invalid @doNotStore assignment analysis"
This reverts commit 1e2772d106.

Reason for revert: Analyzer crash: b/165866426

Original change's description:
> invalid `@doNotStore` assignment analysis
> 
> TODO: follow-up with an `extensions_test`
> 
> Change-Id: Ie3d18229daf347885128d02e4b751436a8a0643f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159560
> Commit-Queue: Phil Quitslund <pquitslund@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>

TBR=brianwilkerson@google.com,pquitslund@google.com

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

Change-Id: Icfddee0e62fef3691b446ce92531f9281863880a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159841
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2020-08-24 07:26:06 +00:00
Konstantin Shcheglov afd6344e99 Add write tests, fix write_error_test.dart
Bug: https://github.com/dart-lang/sdk/issues/43100
Change-Id: Ib01192e73905ae1c431491e89e269fd25c6cd9cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159680
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-22 00:24:31 +00:00
Konstantin Shcheglov 63640ea23d Remove ElementFactory.functionElementXyz()
R=brianwilkerson@google.com

Change-Id: I2dc598481d49d83aa0f7994a455af963fe99b5b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159649
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-21 22:24:31 +00:00
Konstantin Shcheglov 6fb1e57f3a Move _hasSetter and typeInferenceError.
R=brianwilkerson@google.com

Change-Id: I8bf476dd6323f01d987c7cf2c3378f6beb37c267
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159647
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-21 21:17:10 +00:00
Konstantin Shcheglov c2bc119c21 Issue 43144. Convert the bound of type parameter to legacy if necessary.
Bug: https://github.com/dart-lang/sdk/issues/43144
Change-Id: I2bf50c498d7919460133d1bed07ce2de861fce08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159646
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-21 20:18:10 +00:00
Konstantin Shcheglov 085076337b Add LocalVariableElement/PropertyInducingElement.hasInitializer, ParameterElement.hasDefaultValue, deprecate VariableElement.initializer
Change-Id: I02ba37b4f6f1ce79ffddf40613646b99ecbedc9d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159582
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-21 18:20:30 +00:00
Konstantin Shcheglov 62bd19cac9 Extract VariableDeclarationResolver.
Change-Id: Ib88682ae56b3e1dd9717957d6f01571de5a685a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159600
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-21 02:05:47 +00:00
pq 1e2772d106 invalid @doNotStore assignment analysis
TODO: follow-up with an `extensions_test`

Change-Id: Ie3d18229daf347885128d02e4b751436a8a0643f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159560
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-20 23:58:06 +00:00