Johnni Winther
7269b792c1
[cfe] Update message for opt-out packages run with sound null safety
...
This groups the message for opt-out packages and mentions running
'pub outdated' to looked opted in versions.
Closes #42464
Change-Id: Ib3bc411c5f3523af3672bed8837e953aaa551479
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153964
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-07-13 13:37:55 +00:00
Jens Johansen
01ac35b844
[parser] Allow '..' as something following a nullable type
...
Fixes https://github.com/dart-lang/sdk/issues/42621
Change-Id: I56fd9475ffb3821592a6917949e858c6e48bdf20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153773
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2020-07-09 15:03:17 +00:00
Johnni Winther
9ab7a5edef
[cfe] Use variable name in error message for missing initializer
...
Closes #42610
Change-Id: I70a5ac9302bd6545cd5e73f2dab61a29bc6a3000
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153462
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-07-08 12:45:15 +00:00
Paul Berry
36e89f845b
Flow analysis: ensure that restrict method doesn't try to promote write-captured variables.
...
Fixes #42066
Change-Id: Ieab80c004b3d331abb81916c3e158416bcd3ce86
Bug: https://github.com/dart-lang/sdk/issues/42066
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153480
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-07-08 01:37:30 +00:00
Johnni Winther
34f5c9d0b4
[cfe] Implement new async return rules
...
Closes #41800
Closes #41900
Closes #42134
Closes #42282
Closes #42236
Closes #42169
Change-Id: Ia994bc07fba4e2342fcb59d44fc77608198a328b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152150
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-07-06 07:04:40 +00:00
Paul Berry
63feed82e1
Rename FlowModel.removePromotedAll to .conservativeJoin.
...
This makes the implementation consistent with the spec text in
https://github.com/dart-lang/language/commit/1ed6bab4cc5a826f1ed6a81fb70a4f23815e1a82 .
Change-Id: Ie25b928c5aacb45a18e85c6f9196b5b55f083478
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152983
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-07-01 13:46:48 +00:00
Johnni Winther
236f3f820d
[cfe] Fix flow analysis in initializers
...
The handling of null shorting in the variable initializer interfered with
the declaration of the variable, making subsequent flow potentially
losing track of promotions.
Closes #42504
Change-Id: Idb17920ffe8746983825714f76160abcca54751b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152760
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-07-01 08:57:18 +00:00
Konstantin Shcheglov
7ee4dd1be5
Prepare to publish analyzer 0.39.11 and _fe_analyzer_shared 5.0.0.
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: Ia7cb0355c2595ba6f84f19f6f62b468ccd6d7d72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152986
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-06-30 23:14:37 +00:00
Paul Berry
019755f77b
Flow analysis: simplify marking of loop-assigned variables as not-unassigned
...
At the top of a loop, loop-assigned variables need to be marked as not
definitely unassigned, otherwise we will give incorrect results for
code like this:
```dart
f() {
late int x;
bool firstIteration = true;
while (true) {
if(firstIteration) {
x = 0;
firstIteration = false;
} else {
print(x); // BOGUS ERROR: x definitely unassigned
}
}
}
```
Previously, we were handling this by calling `joinUnassigned` at the
bottom of `removePromotedAll`, but it's simpler to just mark these
variables as not-unassigned while discarding promotions. This change
will make the implementation more closely match spec changes I'll be
making shortly.
Change-Id: If50e28d20a75730aa5187a62ae5cac8690b0dfaf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152861
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-06-30 02:46:26 +00:00
Johnni Winther
d5120208b4
[cfe] Update CFE message to use 'null safety' instead of 'non-nullable'
...
Closes #42464
Change-Id: I2865cd4ff2fac3c40d5f8b8d26d6b958919682b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152481
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2020-06-26 13:09:52 +00:00
Sam Rawlins
d022d4c9e1
Migrator: Fix if-null promotion with GLB
...
Fixes https://github.com/dart-lang/sdk/issues/42375
EdgeBuilder wishes to do its own GLB type-joining, as does FlowAnalysis.
When FlowAnalysis pushes a promotion in ifNullExpression_rightBegin,
and then in write, and then pops those two promotions to join them in
ifNullExpression_end, EdgeBuilder is not given a chance to make its
own GLB node. Instead promotion never happens: the DecoratedType which
is the variable's type is promoted to non-nullable, for the left side.
The DecoratedType for the right side expression is not considered
non-nullable, so the FlowAnalysis.join will always fail to promote.
TypeOperations.adjustPromotedTypes solves this. It is a no-op in all
implementations except in EdgeBuilder.
Additionally FlowAnalysis.write's promotion fails for the same reason:
the only type of interest is the declared type made non-nullable, and
no matter what, the writtenType is not a subtype of this.
TypeOperations.forcePromotion solves this. It is a no-op in all
implementations except EdgeBuilder.
Change-Id: Iba6b9a69583af8fe1aa23124c7d66047acfff495
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152104
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2020-06-25 21:09:12 +00:00
Mayank Patke
3b67681bcc
[dart2js] Clean up (pre-)NNBD unit test configurations.
...
Change-Id: Ife85aafa90b1b0347fabb6e95f3d6c00c5307cd2
Bug: https://github.com/dart-lang/sdk/issues/42063
Fixes: https://github.com/dart-lang/sdk/issues/42063
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152440
Reviewed-by: Joshua Litt <joshualitt@google.com >
Commit-Queue: Mayank Patke <fishythefish@google.com >
2020-06-25 18:44:32 +00:00
pq
43eb8790f3
Support for customized diagnostics
...
Rationale: internally we patch a number of diagnostic messages to add context to messages (and corrections). Introducing maps that allow for customization makes the internal patching process far easier and less prone to error.
Change-Id: I2d1e7488b451654dd24b8ae95647619c65d3974b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151664
Commit-Queue: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: David Morgan <davidmorgan@google.com >
2020-06-24 13:34:19 +00:00
Johnni Winther
7fce125300
[cfe,kernel] Add AstPrinter
...
This CL adds a Node.toText method together with an AstPrinter. These
facility and better toString implementation on AST nodes while allowing
for toString independent printing of AST to use in testing. This also
add support for an integrated toString of custom/internal nodes.
Some work is still needed in bringing the toString implementation on
all nodes to the old quality, and not all internal nodes have
customized textual representations yet. This work is left for future
CLs.
Change-Id: Ib0bf8a0bc02f489dfacdc8aa5f96da9c52f26058
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150923
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2020-06-16 17:15:10 +00:00
Konstantin Shcheglov
a1fc2ea80c
Make variables assigned in a loop not definitely unassigned anywhere in the loop.
...
Bug: https://github.com/dart-lang/sdk/issues/42301
Change-Id: I75962b976427cef7f40025f1dcd9f27400306825
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151047
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-06-15 17:29:05 +00:00
Konstantin Shcheglov
24852421e2
Change method override inference to use combined member signature.
...
https://github.com/dart-lang/language/pull/975
Change-Id: I5cec14a384b124a29dcd5adac0f0be6e5214cc9e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151044
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-06-12 18:59:28 +00:00
Jens Johansen
50836c171e
[parser] Fix parsing of empty index in cascade
...
Fixes #42267
Change-Id: Ia09fd9e564bc0b04cdd99d3aac5093a12ab10d96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150926
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2020-06-12 06:36:58 +00:00
Konstantin Shcheglov
97e291ba9f
Mark any variables assigned in the body of try/catch not definitely unassigned in catch.
...
Bug: https://github.com/dart-lang/sdk/issues/42235
Change-Id: Iad3792bef1dc8f468d8b9e7ec729e1cbdf6c946a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150600
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-06-10 16:17:37 +00:00
Jens Johansen
020359dcc8
[parser] Remove false comment
...
Remove false comment that was left in by accident when changing
typedef recovery.
Change-Id: I1b2a24664775a0405c8bf04233c5db1e27b53c73
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150362
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2020-06-09 06:28:37 +00:00
David Morgan
48d105a551
Fix unused_shown_name in parser_impl.dart.
...
Change-Id: Id512c06920ed61162ba07a6fb0b74f4794274686
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150220
Auto-Submit: David Morgan <davidmorgan@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-06-05 09:36:54 +00:00
Jens Johansen
cbbbc09b3e
[parser] Better recovery of typedefs with bad name
...
Note that this leaves differences in errors issued between
"typedef void void();" and "typedef void = void Function();" though.
Fixes #42158
Change-Id: I0785f99234c87bdeadbb2865e089b1389851333e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149599
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2020-06-04 14:21:11 +00:00
Johnni Winther
23d70f6f23
Reland: [cfe] Embed and use allowed experiments in CFE
...
This CL embeds the sdk_nnbd/lib/_internal/allowed_experiments.json
into the CFE and uses this to allow experiments enabled on a
per library basis. The file is embedded through generated code to
avoid reliance on access to the file itself.
A presubmit check is also added to ensure that the json file and
the generated code are in sync.
This work is in preparation for https://github.com/dart-lang/sdk/issues/41538
This was reverted in https://dart-review.googlesource.com/c/sdk/+/149620
because flutter wasn't prepared for auto-enabling nnbd in dart:* libraries.
This has now been fixed in https://github.com/flutter/engine/pull/18714
Closes #42162
Change-Id: I686ed6feaef8ee066b426068fe2a0f5080bf1713
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149588
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-06-03 08:15:49 +00:00
Paul Berry
ad044b8a4f
Prepare to publish analyzer 0.39.9 and _fe_analyzer_shared 4.0.0.
...
Change-Id: Idb30ab930d408423f2865a71ca3da0b3daf464da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149742
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-06-02 20:20:43 +00:00
Johnni Winther
aec6a3529e
Revert "[cfe] Embed and use allowed experiments in CFE"
...
This reverts commit a936f3019e as it broke
flutter hhh fuchsia build: https://ci.chromium.org/p/dart/builders/ci.sandbox/flutter-engine-linux/10876
Change-Id: I0a83e5edf8d53fc648a4f548529e456a5e6bcfc9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149620
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Alexander Aprelev <aam@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-06-02 08:48:51 +00:00
Johnni Winther
a936f3019e
[cfe] Embed and use allowed experiments in CFE
...
This CL embeds the sdk_nnbd/lib/_internal/allowed_experiments.json
into the CFE and uses this to allow experiments enabled on a
per library basis. The file is embedded through generated code to
avoid reliance on access to the file itself.
A presubmit check is also added to ensure that the json file and
the generated code are in sync.
This work is in preparation for https://github.com/dart-lang/sdk/issues/41538
Change-Id: Ic03c0fc69684d124c685f2fe6e80423a7e751530
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149064
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2020-05-30 09:47:02 +00:00
Johnni Winther
3a021a6545
[cfe] Remove EvaluationMode.legacy
...
This is no longer valid. Since the SDK is agnostic we should default to weak mode.
Change-Id: Ia9fbf911e7ebb595c93a71afe3bb8de7495cebba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149065
Reviewed-by: Jens Johansen <jensj@google.com >
2020-05-30 09:47:02 +00:00
Joshua Litt
20faaa5d94
[dart2js] Move dart2js unit tests to pkg/compiler/test.
...
Change-Id: Ib18f554c1076f27a3f7c0df5a36410da41a1f467
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148784
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2020-05-28 18:51:11 +00:00
Dmitry Stefantsov
142d09fed7
[cfe] Provide better context in verifier's diagnostics
...
Change-Id: I599eb100acab431fc5630305951120dfe98e79b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148763
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-05-26 10:02:05 +00:00
Konstantin Shcheglov
bb0b3cf23a
AllowedExperiments and parser.
...
Change-Id: I9b05c1b9a58ac974dd4edf02db5ffb0d51d54484
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148621
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-05-20 15:33:31 +00:00
Jens Johansen
5a463ef5ca
[parser] Add comments to calls in parser et al
...
Change-Id: I8c364a6fa10b6db039c3a38ac6b3832086cbf5f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147542
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-05-20 12:40:12 +00:00
Johnni Winther
383a8ea857
[cfe] Initial support for external fields.
...
Change-Id: Iccee87f40df395c928dc1a9dc81ddad8813a5000
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147906
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-05-14 18:34:06 +00:00
Johnni Winther
00353040b9
[CFE] Error when strong mode mixed with non-opted-in
...
Change-Id: Ibff34fe071a6d10ce29c30e1d008d4a5ce6690a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140868
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2020-05-14 17:10:51 +00:00
Paul Berry
3ca37fb66e
Re-apply some recent parser fixes.
...
My recent revert (275b922ee8 ) mistakenly
reverted too much (I incorrectly attributed the angular failure to
1f9b5c1996 when it was actually due to
96df1f9e6c ). Reapply the commits that
are ok.
This re-applies commit 1f9b5c1996 .
This re-applies commit c40b24da48 .
Change-Id: I4d64b1511b92d87197a5e939903a31e01f0b2e70
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147920
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-05-13 16:00:01 +00:00
Paul Berry
275b922ee8
Revert recent parser fixes
...
Commit 1f9b5c1996 causes tests to fail
in angular when rolled into internal sources; the other two commits
need to be reverted as well to avoid merge conflicts.
This reverts commit 1f9b5c1996 .
This reverts commit c40b24da48 .
This reverts commit 96df1f9e6c .
Change-Id: Ic4e55181ef60e825ce4409a9a9528ecbf19c39c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147822
Reviewed-by: Mike Fairhurst <mfairhurst@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-05-12 22:02:09 +00:00
Jens Johansen
96df1f9e6c
[parser] Add ErrorToken for ignored (unmatched) end parenthesis, brackets etc
...
Change-Id: Idb57295700988d71321743af9782134b02562311
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146240
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-05-11 14:46:47 +00:00
Jens Johansen
64714f2596
[CFE] Include _fe_analyzer_shared in tests
...
Change-Id: I6d2ab3465a0aa2488cbe7b9a2f1909ab6c615d32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147082
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-05-11 13:13:21 +00:00
Johnni Winther
f4f0ba4b36
[cfe] Update id-tests post unfork
...
These were for some reason not updated by the update_all script on the
first run.
Change-Id: I49dc1f5524c120947a971356548755325c63e8d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147360
Reviewed-by: Siva Annamalai <asiva@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-05-08 17:25:41 +00:00
Jens Johansen
1f9b5c1996
[parser] Recovery of unbalanced parenthesis, brackets etc.
...
Bug: https://github.com/dart-lang/sdk/issues/41000
Change-Id: I8d1d8ff5d3f832f9b6b5e5880b59a485a7ff9b96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146224
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-05-07 10:04:08 +00:00
Erik Ernst
b0837b9aeb
Corrected non-function type alias diagnostics
...
Errors involving superinterfaces in class declarations will now mention
both the type alias and the unaliased type, e.g., in cases like
`class A extends T {}` where `typedef T = void;`.
Change-Id: I5bb575b98329e8338560d1ee5dc18e71da9711e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146720
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Erik Ernst <eernst@google.com >
2020-05-07 09:00:57 +00:00
Jens Johansen
5b76fc2172
[parser] Better recovery of methods/fields called 'const', 'final', 'var' or 'void'
...
Change-Id: I370089a6de8c585a60785fe069de5da869ae23f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145820
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-05-06 11:56:24 +00:00
Jens Johansen
15acf8a51f
[parser] Replace isBuiltIn and isPseudo (and implicit isReserved) with explicit enum
...
Change-Id: I1e77e97989b931160bf98c99272e0a016920b8cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145801
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-05-05 11:53:54 +00:00
Jens Johansen
2ac2433a31
[parser] Remove @deprecated methods
...
Change-Id: Ib8b5e6b95067acc2bed8586088ee55222cb9d80b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145800
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-05-05 09:42:23 +00:00
Jens Johansen
497bdc5226
[parser] Some recovery from using reserved words as method/field names
...
Change-Id: I9795ecc28f06d1f9410066ded73405019052947d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145586
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2020-05-05 07:56:33 +00:00
Johnni Winther
e7bebea059
[analyzer,cfe,dart2js] Make id-testing wildcard customizable and unsupported by default
...
Change-Id: Id11dc3c04d1d42853566e492b7d5aead4a35a724
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145781
Reviewed-by: Joshua Litt <joshualitt@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-05-04 12:58:24 +00:00
Konstantin Shcheglov
0662b64697
Test that demotion to NonNull via assignment works.
...
This is the second part of the referenced issue.
Practically, we don't do anything special during demotion, we merely
demote when write T to such type S, that T <: S. This S must be a
type of interest (tested or declared). If it happens to be nullable,
and T < NonNull(S), we will promote to NonNull(S).
Bug: https://github.com/dart-lang/sdk/issues/40011
Change-Id: I254b4bfbbfad47fa2c2811def864c8ce0419b7c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145740
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-05-01 16:55:53 +00:00
Konstantin Shcheglov
cf3a034210
Implement promotion via initialization in flow analysis.
...
Change-Id: I10a5f6bfeb5a05dd144db5212c9f31796f5a2385
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145502
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-04-30 16:26:27 +00:00
Jens Johansen
b1435ec38a
[CFE] Textual outline can sort data
...
Change-Id: Iac337903aace923f2cff8797840aa5cdbfded03f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145400
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-04-30 08:25:17 +00:00
Konstantin Shcheglov
e20731c0c3
Exit sooner from VariableModel.write() when writeCaptured.
...
No semantic changes, I think.
Just a step closer to what the spec says.
R=paulberry@google.com
Change-Id: I3b27c3daa3b93d425ede56bc1b2b1056210135d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145243
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2020-04-29 16:32:54 +00:00
Konstantin Shcheglov
d131ea4e13
Add Variable type parameter to VariableModel.
...
So, we can use exact type for TypeOperations, and it will be convenient
for implementing promotion via initialization.
R=paulberry@google.com
Change-Id: I5b1243d5a4ac95f92ee1d08e6ed64be09e8c8f53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145306
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-04-29 15:08:23 +00:00
Paul Berry
f4efe7bdb8
Prepare to publish analyzer 0.39.8
...
Change-Id: I6712e973c11da7e443a12ccda86aa411781bdf75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145024
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Janice Collins <jcollins@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-04-28 17:18:02 +00:00