Konstantin Shcheglov
8e8836c768
Record log entries as FileResolver loads / removes libraries.
...
R=brianwilkerson@google.com , keertip@google.com
Change-Id: I566ad9488351ef777a35d48979b32ce106c88597
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164021
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Keerti Parthasarathy <keertip@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-09-22 19:31:31 +00:00
Konstantin Shcheglov
74d47c9891
Resolve PrefixExpression and PostfixExpression using shared write resolution.
...
Change-Id: Iebdcfe3e633836cdfc546d4bfa45a302a883985e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-09-22 18:49:00 +00:00
pq
a7364369a9
add missing @override
...
Change-Id: I2b4a87c66f09d3b54166f345417dbc71659aac86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163761
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
2020-09-22 14:26:23 +00:00
Konstantin Shcheglov
5120a33aa6
Resolve IndexExpression in AssignmentExpressionResolver.
...
Change-Id: Ibaf1dad7d7dc271b73476ef61742d6d72aba0380
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163723
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-09-21 21:18:42 +00:00
Konstantin Shcheglov
8605286e11
Make constant-update-2018 available since 2.0.0
...
See https://github.com/dart-lang/language/issues/286#issuecomment-503614115
and https://github.com/dart-lang/sdk/issues/43462
Change-Id: Id844473e0cb371ffc4470a18993c66c8ad0427e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163503
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-09-21 20:39:32 +00:00
Konstantin Shcheglov
b4a09d8dec
Catch exceptions from File.resolveSymbolicLinksSync()
...
Bug: https://buganizer.corp.google.com/issues/169040783
Bug: https://github.com/dart-lang/sdk/issues/43497
Change-Id: I5f4c1ffaec4af2d4d3855b9a99c3a78c36401ce3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-09-21 18:36:32 +00:00
Konstantin Shcheglov
cf5e8a7a2f
Use Object* or Object? when LUB with a type parameter.
...
Not the full fix yet.
Bug: https://github.com/dart-lang/sdk/issues/43478
Change-Id: Ic405ebdab4b5a1a6816328cfa66b55478dd60c71
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-09-19 21:43:07 +00:00
Konstantin Shcheglov
01154855d1
Make control-flow-collections, set-literals, spread-collections available since 2.0.0
...
See https://github.com/dart-lang/language/issues/286#issuecomment-503614115
and https://github.com/dart-lang/sdk/issues/43462
Change-Id: Ib8c37a2b5e3ce6c737e496bf285d946baf3a41d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163401
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-09-19 16:12:07 +00:00
Sam Rawlins
51840c501a
Analyzer: add two checks for the @internal annotation.
...
The meta package does not yet have an `internal` constant;
this CL just adds one to the mock packages for testing.
Two checks are implemented:
* Hint if an @internal annotation is found on an element which is
already part of a package's public API (based on file path).
* Hint if an element annotated with @internal is exported from a
package's public API.
The notion of "public API" is also implemented for each type of Package:
BasicPackage, BazelPackage, GnPackage, PackageBuildPackage,
and PubPackage.
Bug: https://github.com/dart-lang/sdk/issues/28066
Change-Id: Ifc2709028afcd241f59e802f5952539f717704c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163126
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-09-18 23:04:06 +00:00
Konstantin Shcheglov
524f739e0b
Make using shared ByteStore optional.
...
I plan to set the flag to `true` locally, but git-ignore the file, so
avoid uploading it for review as I did several times.
Change-Id: Ic7fe4666b0a59fdc662d43baaf7cd2cba9f05005
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163480
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-09-18 22:26:16 +00:00
Konstantin Shcheglov
ffe53f03f9
Remove TypeSystem / TypeProvider from ConstantEvaluationEngine.
...
We always need to use the properties of the library.
So, these "default" values are not usable.
Change-Id: I94c63d28900186a7f0e0733717612683aaed122f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163320
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-09-18 18:44:36 +00:00
Konstantin Shcheglov
77bf324887
Fix a test for Windows.
...
Change-Id: Id35d9c87f8922411461b718c9e3d3babc799416e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163400
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-09-18 16:36:06 +00:00
Konstantin Shcheglov
aab7e93b15
Preserve element and typeArguments of FunctionType during legacy erasure.
...
Change-Id: I02670f86773ed65b0943c9a28fd03e89da2208ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163301
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-09-18 00:04:41 +00:00
Konstantin Shcheglov
cefa35962d
Issue 43465. Break infinite recursion that might happen with file system links.
...
Bug: https://github.com/dart-lang/sdk/issues/43465
Change-Id: I1f5f17af019345ba361a507263fdfea7cb9b0952
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163302
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-09-17 23:53:51 +00:00
Konstantin Shcheglov
044d3d5e22
Add MemoryResourceProvider.newLink()
...
R=brianwilkerson@google.com
Bug: https://github.com/dart-lang/sdk/issues/43465
Change-Id: I56a33413cc297b1c362b92b60999e3b506d5e139
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163264
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-09-17 22:40:01 +00:00
Konstantin Shcheglov
5051d75bc6
Issue 43462. Compute constant values in libraries with contain them.
...
R=brianwilkerson@google.com
Bug: https://github.com/dart-lang/sdk/issues/43462
Change-Id: I82200c06b1a77f634b7c7f30fd3ad7e10eb01ad4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163280
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-09-17 21:26:13 +00:00
Konstantin Shcheglov
b820083ed9
Issue 43439. Identify invalid URIs with double '/' or '.' in BazelPackageUriResolver.
...
Bug: https://github.com/dart-lang/sdk/issues/43439
Change-Id: Ifc7f24ff0e4938d85ddd225fbf576d3a60cc608c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163134
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-09-17 21:09:43 +00:00
Sam Rawlins
f28fb78e8f
Analyzer: Use 3 upcoming pedandic lints
...
Change-Id: I7bd1d856024feee5c4e3ab346a46db059b692b53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163160
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2020-09-17 16:20:42 +00:00
Konstantin Shcheglov
4b30c91266
Resolve PrefixedIdentifier in AssignmentExpressionResolver.
...
R=brianwilkerson@google.com
Change-Id: I4239dba7f6f6255e0db501a7588ca3a51ee18416
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163003
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-09-16 16:17:38 +00:00
David Morgan
8d8df2c9f6
Revert "Issue 43162. Change matching dynamic/void vs. 'T?'."
...
This reverts commit 7b0aeb2ac8 .
Reason for revert: regressions in analysis in legacy mode, see b/168675476
Original change's description:
> Issue 43162. Change matching dynamic/void vs. 'T?'.
>
> Bug: https://github.com/dart-lang/sdk/issues/43162
> Change-Id: I8ae2166e4bc593b42ddd39c35e7d02a706d7b94d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162621
> Reviewed-by: Leaf Petersen <leafp@google.com >
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
TBR=leafp@google.com ,scheglov@google.com ,brianwilkerson@google.com ,srawlins@google.com
Change-Id: I288f8ccf82c17565c40e02245998590ebd7c98bc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/43162
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162747
Reviewed-by: David Morgan <davidmorgan@google.com >
Commit-Queue: David Morgan <davidmorgan@google.com >
2020-09-16 07:36:05 +00:00
Konstantin Shcheglov
7b0aeb2ac8
Issue 43162. Change matching dynamic/void vs. 'T?'.
...
Bug: https://github.com/dart-lang/sdk/issues/43162
Change-Id: I8ae2166e4bc593b42ddd39c35e7d02a706d7b94d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162621
Reviewed-by: Leaf Petersen <leafp@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-09-16 02:31:02 +00:00
Konstantin Shcheglov
f7d1c55a19
Resolve 'call' on FunctionType(s), and Never in TypePropertyResolver.
...
Change-Id: I357e3704ab48378d4f4f87dbc41148193c23d592
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-09-15 21:32:02 +00:00
Konstantin Shcheglov
744e34aec0
Support type parameters in ReplaceTopBottomVisitor.
...
See https://github.com/dart-lang/language/pull/1133
Change-Id: I3800b88496a8bf214b4bc366f4cb7ef3e9968f17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162784
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-09-15 04:39:31 +00:00
Konstantin Shcheglov
c20d17b18f
Change TypePropertyResolver and ResolutionResult to specify if an error should be reported.
...
Change-Id: I4fd76b605acfb12488cfedd2571b1af964fdbd25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162840
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-09-15 04:36:41 +00:00
pq
62abba754b
validate returns of @doNotStore
...
See: https://github.com/dart-lang/sdk/issues/42497
Change-Id: I86516a19eb7a6560f95ea888ab1384208da222f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162821
Commit-Queue: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-09-14 23:59:08 +00:00
Konstantin Shcheglov
a08054586c
Report errors on the compound assignment operator, not the left expression.
...
Change-Id: Icc53a35082cdbbb05db3f009eb9d6b743ef9e7a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162782
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-09-14 18:19:09 +00:00
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
ce6a95c15d
Revert accidentally landed shared ByteStore.
...
We decided not to land this, but I change it locally to test faster,
and forgot to revert with one of the CLs.
Change-Id: I4817c768778c0bb10fc0030fb5885bac8fbe2ce4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162622
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-09-13 00:56:18 +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
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
ec65869de7
Use assertNoErrorsInCode() instead of the empty list of errors where possible.
...
R=brianwilkerson@google.com
Change-Id: Iac17fe779fc44dec3319687d80fc97761e7332f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162481
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-09-11 20:22:53 +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
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
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
88980bf724
Fix verify_diagnostics_test.dart.
...
This was broken by a4b2047d9d .
Bug: https://github.com/dart-lang/sdk/issues/43263
Change-Id: Ia9bdec633861172c06b30fbe8260b648f1fee39e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161661
Auto-Submit: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-09-03 05:15:23 +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
Mike Fairhurst
57a877a1a1
[analyzer] Remove dart:async imports from test cases
...
Change-Id: I804fd909e7c3363e78ecb90a954e17301fa77a2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161470
Auto-Submit: Mike Fairhurst <mfairhurst@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2020-09-02 23:45:12 +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
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
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