Jens Johansen
e6ffc0b285
[parser] Issue different warnings for missing identifier based on whether the token is used or not.
...
E.g. "var = 42;" now has a different error message than "var default = 42;".
Fixes #22553
Change-Id: I58affe988569d8e79190b63f7267b471a1b0ebc8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162182
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-09-14 08:55:18 +00:00
Konstantin Shcheglov
ba78db411a
Remove DartSdk.analysisContext
...
Change-Id: I6a67344d928e6182a851741bbbc862284af710c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162623
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-09-13 00:56:36 +00:00
Konstantin Shcheglov
c71ce5234d
Remove DartSdk.analysisOptions getter/setter.
...
Change-Id: I6bdcd1d8c2e998bf4adbf26ddf533f5d649c73c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162620
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-09-12 21:33:26 +00:00
Konstantin Shcheglov
0567babb06
Include packageLanguageVersion into the linked signature.
...
It is exposed from LibraryElement.
Change-Id: I6acf704312e185ff8fd8b6391590d5385f9821df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162482
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-09-12 17:23:25 +00:00
Konstantin Shcheglov
38156a5a39
Merge TypeSystem2 into TypeSystemImpl.
...
Change-Id: I66f9032ed12166966e1e9eefe00d1e252ea175e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162385
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-09-12 17:21:25 +00:00
Konstantin Shcheglov
44928c7a20
Issue 43397. Fix isDefaultConstructor when view from a legacy library.
...
Bug: https://github.com/dart-lang/sdk/issues/43397
Change-Id: I1cd4ae4bea441732d1c6ef68a917fcccb144ec62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162584
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-09-12 16:28:05 +00:00
Konstantin Shcheglov
54e98b03d7
Fix for inference when AssignmentExpression references a not yet inferred variable.
...
Change-Id: I61b57429607454d4cfe002fe6588858853a166dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162560
Reviewed-by: Mike Fairhurst <mfairhurst@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-09-11 21:35:25 +00:00
Konstantin Shcheglov
af110a7aa4
Change resolution of assignment to PropertyAccess.
...
Change-Id: Ie9de1166eb0dfd179d539f1b10c54084caf643d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162248
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-09-11 15:50:20 +00:00
Konstantin Shcheglov
51f766f5a8
Support for 'dart_package (null_safety = True)' in Cider.
...
R=brianwilkerson@google.com , keertip@google.com
Change-Id: I840afe2f673651fa941df63255e710d2ccdd1f39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162360
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Keerti Parthasarathy <keertip@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-09-10 21:11:45 +00:00
Sam Rawlins
d266dfb1a4
Analyzer: Refactor _PSDependency factory constructor to not return null
...
Change-Id: I8bab14bacc14c88fc0d0c3276aee1d48be40116a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162101
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2020-09-10 19:07:37 +00:00
Jens Johansen
b0acaea1e5
[parser] Recover written out binary operators
...
* Add mechanisms to try out a recovery and only perform it if is
successful.
* Recover written out binary operators, e.g. "a xor b", "a or b" etc.
This fixes #26810 and is also how these operators are written in e.g.
Kotlin. This might be somewhat controversial though.
* Adds a mechanism to _replace_ a token by another token.
This might be controversial.
It is done because just inserting the operator causes the same rewrite
to be attempted on the same token stream several times (at least with
the way the token stream is parsed via the CFE) in turn causing it to
be recovered *sometimes*. This is now avoided by actually replacing
the token.
Change-Id: Icfa806045575d2aa2e5f35126708651b275bcf84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162003
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-09-10 06:23:33 +00:00
Konstantin Shcheglov
6daf283c96
Inline computing type for ??.
...
Change-Id: Ie71c9653615e67e4ab73a0bda9b41685f0fb84cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162105
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-09-09 15:50:19 +00:00
Konstantin Shcheglov
1a784f4ebd
Remove unnecessary _nonNullable() in AssignmentExpressionResolver.
...
Change-Id: I0e551966c662c278e4151c53f35c6ba40d88633e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162123
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-09-09 15:49:53 +00:00
Jacob MacDonald
ca25787ad4
update feature_set_provider to recognize asset uris in the same way as package uris
...
Bug:b/167264816
Change-Id: I4cdd76a6a81723b5817088b8cf92a54e5c82ee42
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161662
Auto-Submit: Jake Macdonald <jakemac@google.com >
Commit-Queue: Jake Macdonald <jakemac@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-09-03 16:55:25 +00:00
Konstantin Shcheglov
41fe5e1560
Report ASSIGNMENT_TO_FINAL for top-level variables.
...
Change-Id: I75aed440d2431e674eb87f230a16655b2ace90c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161660
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-09-03 16:37:15 +00:00
Paul Berry
a4b2047d9d
Reland "Flow analysis changes to fix mixed-mode unsoundness loophole."
...
This is a reland of d833f2f65c
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 >
Bug: https://github.com/dart-lang/language/issues/1143
Change-Id: If9c45649c1e9f4b19f7c282e7a1c4c956a7bc17f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161622
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-09-03 01:01:43 +00:00
Konstantin Shcheglov
3692695405
Move isInstanceMember to ElementExtension.
...
R=brianwilkerson@google.com
Change-Id: If077667e97fe00d4ab018f864d9c0992ec94cb9e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161445
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-09-02 20:43:22 +00:00
Konstantin Shcheglov
16e63e9b61
Fix constant evaluation when null safe from legacy, super constructor invocation.
...
Bug: https://buganizer.corp.google.com/issues/167265320
Change-Id: I7de8a0feed8425604d19af5bd6381c94573225a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161621
Reviewed-by: Mike Fairhurst <mfairhurst@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-09-02 20:22:33 +00:00
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
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
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
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
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