Mike Fairhurst
602ac1226d
Check if element conditions for downcasts
...
Change-Id: Ie1277f0efd5b327d1d068c0f8ce21f377313ee82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97543
Commit-Queue: Mike Fairhurst <mfairhurst@google.com >
Auto-Submit: Mike Fairhurst <mfairhurst@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-03-21 20:49:12 +00:00
Konstantin Shcheglov
2ffe0c7b7a
Report not potential constants in ShortCircuitOperators.
...
Also fix getNotPotentiallyConstants() to allow parameters of const
constructors in constructor initializers.
I'n not sure about using new CompileTimeErrorCode.NOT_POTENTIAL_CONSTANT,
it could be generic INVALID_CONSTANT, and report for constant literal
elements errors like NON_CONSTANT_LIST_ELEMENT, or NON_CONSTANT_MAP_KEY.
So, a bit inconsistency maybe, but we give more specific errors.
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I88d8db77f7e5521e03e623cc26171a70599ba614
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97522
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-03-21 20:18:42 +00:00
Mike Fairhurst
40e77d29d5
Tests for implicit cast properties; add cast for <T>[...dynamic].
...
Change-Id: Ia04c75d304dc6673c9f637c9007a8eb60062078c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97461
Auto-Submit: Mike Fairhurst <mfairhurst@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Nicholas Shahan <nshahan@google.com >
Commit-Queue: Mike Fairhurst <mfairhurst@google.com >
2019-03-21 18:34:47 +00:00
Konstantin Shcheglov
02d5d26b83
Fix for 'int' in const List<void>.
...
This is another issue with runtimeTypeMatch(). This time we will use
both, TypeSystem and DartType.isSubtypeOf(), and accept the value if
any of them succeedes.
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I77294485e1d62e016e25992ba869e909608b1e42
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-03-21 17:37:27 +00:00
Konstantin Shcheglov
ba0147ac07
Resynthesize typedef(s) and generic function types.
...
R=brianwilkerson@google.com
Change-Id: I3ee3014ffc615052ef077dbf58947330e4ca5e17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-03-21 16:11:18 +00:00
Paul Berry
46e0a87008
Add summary support for "for each" elements with declarations.
...
Change-Id: I9bdc8027ce002e87e6a34b3e306f6ef27bbfac59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97444
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-03-21 13:36:52 +00:00
Paul Berry
915b35e463
Add summary support for "for each" elements with identifiers.
...
Change-Id: Id75fbf13d2d7063ff1e3e0122f801321adf0ef89
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97442
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-03-21 13:28:32 +00:00
Paul Berry
9b5a956a0e
Remove AstTestFactory.forStatement2
...
Change-Id: I8738ffbf1579e070c81c732f818c8ac6582debda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97460
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2019-03-21 12:48:10 +00:00
Paul Berry
ecb1bff326
Add summary support for for elements with declarations.
...
Change-Id: Icd0bde20772c96c40a09ca302ec3a18f07511a55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97401
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2019-03-20 23:08:16 +00:00
Paul Berry
7d277c4a32
Introduce methods and classes to replace "2" variants left over from "UI as code" work.
...
The AST refactor for "UI as code" left behind a few things whose names
ended in "2". This CL deprecates those things and creates
replacements that don't end in "2", so that we keep the API clean. In
a future breaking change release of the analyzer we'll remove the
deprecated things.
The following methods and classes are added:
- ForStatement and ForStatementImpl
- ListLiteral.elements
- SetOrMapLiteral.elements
- AstVisitor.visitForStatement
- AstFactory.forStatement
- NodeLintRegistry.addForStatement
The following methods and classes are deprecated:
- ForStatement2 and ForStatement2Impl
- ListLiteral.elements2
- SetOrMapLiteral.elements2
- AstVisitor.visitForStatement2
- AstFactory.forStatement2
- NodeLintRegistry.addForStatement2
In a similar way to how we did the previous stage of AST migration,
the existing visitors have been modified so that the default
implementation of visitForStatement2 redirects to visitForStatement;
this allows clients to change their overrides of visitForStatement2 to
override visitForStatement instead. Once all clients have been
migrated we will be able to delete the visitForStatement2 method.
Change-Id: Ife5949071fe4cb50791cd4f2f4b99a1bfaad54c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97360
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-03-20 22:58:55 +00:00
danrubel
24e5f9142a
Revise ElementResolver postfix NNBD bang processing
...
... to address comments in https://dart-review.googlesource.com/c/sdk/+/97266
Change-Id: I036858d1b0159948c5bd64f6448bc6cd8d0e3e4b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97380
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-03-20 20:34:49 +00:00
Konstantin Shcheglov
d9371f206d
Integration test for AstBinaryWriter and AstBinaryReader.
...
Write and read every Dart file in pkg/.
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I16df3188b3fac85925027b7f0ee385d1a522c31c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97350
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-03-20 19:52:31 +00:00
Brian Wilkerson
495c319574
Reland "Add hints to check the SDK constraints for both set literals and for the ui-as-code features"
...
Change-Id: I511ea50c835c73d7eed518902ebdfa9497d03f9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97267
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-03-20 15:40:22 +00:00
Paul Berry
b18b626d78
Remove deprecated AST structures related to the "UI as code" feature.
...
This constitutes a breaking change, so the analyzer major version
number is bumped to 36. Clients that have stopped using the removed
data structures (and the methods associated with them) should be
unaffected.
Change-Id: Iab68ecf8d10a13013ebb6b1198c54755225d0eb7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95704
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-03-20 03:36:42 +00:00
Mike Fairhurst
337a252c31
[analyzer] UI as code test cleanup
...
Change-Id: I73300a2aa5cfa1a9043454e462ac1df2840ee308
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97271
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Mike Fairhurst <mfairhurst@google.com >
2019-03-19 22:00:29 +00:00
Mike Fairhurst
d0bdfee041
Fix DDC cast -- cast key/value/element individually & don't clobber names.
...
Change-Id: Id5175782667b760545dac15b02c2a41836137571
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97178
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Mike Fairhurst <mfairhurst@google.com >
Auto-Submit: Mike Fairhurst <mfairhurst@google.com >
2019-03-19 21:06:48 +00:00
Konstantin Shcheglov
67243e0396
AstTextPrinter that prints AST tokens into their original positions.
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I3ca2167c43408c535f61179ec7ea701acd65cc57
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95600
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-03-19 20:57:29 +00:00
Konstantin Shcheglov
d214646d89
Remove TestAnalysisContext and related.
...
R=brianwilkerson@google.com
Change-Id: I94030893b9c65e8f6c854a8453d12734ef08e690
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97270
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-03-19 20:34:29 +00:00
Mike Fairhurst
040fa0f83c
Add undefined identifier test for for loops
...
Change-Id: I590a76525c8f50b28dd3a4a4be448806e4b83027
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97264
Commit-Queue: Mike Fairhurst <mfairhurst@google.com >
Auto-Submit: Mike Fairhurst <mfairhurst@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-03-19 19:40:09 +00:00
Konstantin Shcheglov
85e5684863
Remove OptionsWorkManager and GenerateOptionsErrorsTask is not a task.
...
R=brianwilkerson@google.com
Change-Id: Ic257c13a553835f78bd7bc0778dd33c327097af9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97284
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-03-19 19:03:03 +00:00
Konstantin Shcheglov
2ceaccf5f6
Report EQUAL_ELEMENTS_IN_CONST_SET.
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I6f358c4f78deabc575479070d3ff23efb438ae64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97177
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-03-19 15:55:18 +00:00
Dan Rubel
0c34bf13ea
update ElementResolver postfix NNBD bang processing
...
Change-Id: I700bedc55c42da914fab6d25f4f3620a6ce0b022
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97266
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-03-19 15:35:26 +00:00
Paul Berry
9788949db8
Run dartfmt on pkg/analyzer/test/dart/ast/ast_test.dart
...
Change-Id: Id7388677356bc2af20278eb9e8f5df459fe4df85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97282
Commit-Queue: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Auto-Submit: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-03-19 15:25:16 +00:00
Konstantin Shcheglov
70e3e67dd7
Expect different errors depending on the state of the spread_collections experiment.
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: Ia12ea33be90ef1d390fd0a6c38fd421c317e6562
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97179
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-03-19 14:37:26 +00:00
Dan Rubel
c85108d2f9
Fix parse expression "a ~ b"
...
This fixes an infinite loop that I introduced in the parser
on Wed Feb 27 commit 8f12d634fe
when adding support for the "!" NNBD postfix assert non-null operator.
To the best of my knowledge, this problem only manifests
when parsing the expression "a ~ b".
Fix https://github.com/dart-lang/sdk/issues/36255
Change-Id: If20f45620eee0f7cf9b4b6a93640bd3b921d23b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97265
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-03-19 14:15:06 +00:00
Paul Berry
527b10879e
Begin adding summary support for for elements.
...
Change-Id: Icdcfba5caaac34375b65c838dabc97e9b9201ee9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97120
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Mike Fairhurst <mfairhurst@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-03-18 21:13:10 +00:00
Brian Wilkerson
d7ad6b8c67
Ensure that all tests are run via test_all and add a test to ensure that it stays that way
...
Change-Id: I4a531179823a985f14307cbd444b31605d453d23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97161
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-03-17 19:21:12 +00:00
Konstantin Shcheglov
daa6ee6da9
Report NOT_ITERABLE_SPREAD and NOT_MAP_SPREAD.
...
R=brianwilkerson@google.com
Change-Id: I6668787b5b88d5125852e38bd9d30010e36c354b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97160
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-03-17 17:27:03 +00:00
Konstantin Shcheglov
d920a2a5ab
Report NON_CONSTANT_XYZ in not taken branches of IfElement.
...
R=brianwilkerson@google.com
Change-Id: I27e8a3b99140046399cdcc8daaa7ecc28ffa62df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97010
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-03-16 22:43:34 +00:00
Brian Wilkerson
976b897bd0
Report non-bool conditions in const expressions in evaluation
...
Change-Id: I6c0297ba6d06f0487b3419037109517479b1b794
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97124
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-03-16 18:52:11 +00:00
Brian Wilkerson
43a31ff24e
Report equal keys in maps when the keys come from a spread element
...
Change-Id: I92106a53c2e1752e1ffb1073e124268a692e5905
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97146
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-03-16 15:21:01 +00:00
Konstantin Shcheglov
0d5ab9380a
Add getNotPotentiallyConstants() and isConstantTypeExpression().
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I1db7d336f71d307274917d49f8f414217e62dd16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97005
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-03-16 03:11:52 +00:00
Konstantin Shcheglov
cc1ddfb337
Issue 36212. Fix for updated part without library.
...
R=brianwilkerson@google.com
Bug: https://github.com/dart-lang/sdk/issues/36212
Change-Id: Ib0c43685c0b9f167591232d384a7fc5e426c07d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97007
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-03-16 02:13:12 +00:00
Konstantin Shcheglov
d597166f9b
Remove Dart tasks and work manager.
...
R=brianwilkerson@google.com
Change-Id: I5aaaa0ea5051b4ae639457d260486dbc973abcd9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97140
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-03-16 00:49:22 +00:00
Paul Berry
b9ce1496f1
Sort declarations in expr_builder_test.dart
...
Change-Id: Ib6bf858e5f13385031152a189a05294829de76d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96990
Commit-Queue: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Auto-Submit: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-03-15 22:53:05 +00:00
Brian Wilkerson
43c13284e4
Revert "Reland "Add hints to check the SDK constraints for both set literals and for the ui-as-code features""
...
This reverts commit 75679e06c2 .
Reason for revert: Missed the SDK constraint in one place (or a set literal was added).
Original change's description:
> Reland "Add hints to check the SDK constraints for both set literals and for the ui-as-code features"
>
> This is a reland of 5fdb3c5057
>
> Original change's description:
> > Add hints to check the SDK constraints for both set literals and for the ui-as-code features
> >
> > Change-Id: I1046e57304d56e6d7f088ea1a8a054318a45ac37
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96837
> > Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
> > Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
>
> Change-Id: Ic2fd6d4ad82b6882e20373d224177ea8ebc4685b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97121
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
> Reviewed-by: Paul Berry <paulberry@google.com >
> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
TBR=paulberry@google.com ,scheglov@google.com ,brianwilkerson@google.com
Change-Id: I27c980cc5ed352b13c7510df55c704f7a6622837
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97046
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-03-15 19:54:26 +00:00
Brian Wilkerson
75679e06c2
Reland "Add hints to check the SDK constraints for both set literals and for the ui-as-code features"
...
This is a reland of 5fdb3c5057
Original change's description:
> Add hints to check the SDK constraints for both set literals and for the ui-as-code features
>
> Change-Id: I1046e57304d56e6d7f088ea1a8a054318a45ac37
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96837
> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Change-Id: Ic2fd6d4ad82b6882e20373d224177ea8ebc4685b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97121
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-03-15 17:38:15 +00:00
Paul Berry
02ffcb8f42
Add summary support for if elements.
...
Change-Id: I32582b9608bcf92cabfac94e1d796036198818a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97023
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2019-03-15 15:39:25 +00:00
Konstantin Shcheglov
af633531ab
Report key/value type mismatch.
...
R=brianwilkerson@google.com
Change-Id: If4d4710228935816b98d1250f73b2c1fc600be56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97061
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-03-15 14:18:34 +00:00
Paul Berry
b216335e69
Add summary support for spread elements.
...
Change-Id: I5c306225aacca997ef104e7a2b18001dab38201d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96966
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-03-15 12:53:44 +00:00
Paul Berry
652948175e
Use a dynamic downward inference context for invalid ambiguous set/map literals.
...
Change-Id: I734c77f41b28f27751548e58bfeabb40e0bfa95e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96965
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2019-03-15 12:19:05 +00:00
Konstantin Shcheglov
262878086d
Extract _ConstLiteralVerifier and split it into literal / operation methods.
...
R=brianwilkerson@google.com
Change-Id: I4e3412625cd8c1350bdf7dbc32d92000bc53600e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96986
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-03-15 00:33:13 +00:00
Brian Wilkerson
c3005ee81f
Add error codes for expressions in maps and map entries not in maps
...
Change-Id: I2fdebac61f697710b4fd945f694c28626dabee93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96985
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-03-14 22:01:53 +00:00
Konstantin Shcheglov
208f8b5441
Restore checks for leaf elements in ErrorVerifier.
...
We still need to check static types of leaf elements.
But constants might report additional errors using actual value types.
This fixes regressed:
co19_2/LanguageFeatures/Control-flow-collections/static_semantics_A01_t02/09
co19_2/LanguageFeatures/Control-flow-collections/static_semantics_A01_t02/11
R=brianwilkerson@google.com
Change-Id: Id3a6f650507f4b51028ccbde914da9fae836ed03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97000
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-03-14 21:11:47 +00:00
Brian Wilkerson
0f4a208c3e
Revert "Add hints to check the SDK constraints for both set literals and for the ui-as-code features"
...
This reverts commit 5fdb3c5057 .
Reason for revert: This change broke the flutter bot.
Original change's description:
> Add hints to check the SDK constraints for both set literals and for the ui-as-code features
>
> Change-Id: I1046e57304d56e6d7f088ea1a8a054318a45ac37
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96837
> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
TBR=scheglov@google.com ,brianwilkerson@google.com
Change-Id: Ib29592b382cfd3d6b8c39caefc0db63495af1a0b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97001
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-03-14 21:08:39 +00:00
Brian Wilkerson
5fdb3c5057
Add hints to check the SDK constraints for both set literals and for the ui-as-code features
...
Change-Id: I1046e57304d56e6d7f088ea1a8a054318a45ac37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96837
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-03-14 20:25:24 +00:00
Konstantin Shcheglov
ca2fc831c4
Check types of values in constant List/Set against the element types.
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I19c2b37596dae8fd9f3afb1fadf842be4c944b44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96983
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-03-14 19:53:44 +00:00
Paul Berry
7c3ab264e5
Change link methods to take a DeclaredVariables object.
...
Change-Id: I6cc36f9152fb90642ec3261418e60ac3bdbe5acf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96922
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-03-14 19:52:24 +00:00
Dan Rubel
5d6e17a20d
Improve initializer missing comma recovery
...
Fix https://github.com/dart-lang/sdk/issues/33241
Change-Id: Iab230a9f10f51b1d5ca22a8b8d74751a51d5f9f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-03-14 19:25:04 +00:00
Paul Berry
5e1397fc4e
Remove unused import
...
Change-Id: I18837fe28a92fffc3a8f80460f34f14e94bb19de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96962
Commit-Queue: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Auto-Submit: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-03-14 17:56:16 +00:00