danrubel
f3ac707aea
report error for invalid super/this initializer
...
This reports an error for two more invalid initializer situations
to address comment in https://dart-review.googlesource.com/c/sdk/+/97404
The comments about error message text will be addressed in a subsequent CL.
Change-Id: I45785ae7de4adfdb63a238383e6accf465bd8a74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97601
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-03-22 13:40:10 +00:00
danrubel
4cd410d6ac
add parser listener handleErrorToken event
...
Change-Id: I11ae5f8d25248b9cc3586edbc6e49037d99bb5a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97555
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-03-22 13:36:35 +00:00
Mike Fairhurst
3678efae60
Test that map if elements/else elements keys/values get implicit casts
...
Change-Id: I920400f6924a48364d09cfc9f27dfff57bbe9044
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97523
Commit-Queue: Mike Fairhurst <mfairhurst@google.com >
Auto-Submit: Mike Fairhurst <mfairhurst@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-03-22 07:17:13 +00:00
Konstantin Shcheglov
fa74184b7a
Verify that constructor initializers use only potentially constant expressions.
...
...but don't evaluate them, because they don't have to be constants.
R=brianwilkerson@google.com
Change-Id: I5bc44a02947c1682da85c1f22b3fc28b52b13370
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97549
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-03-22 02:50:43 +00:00
danrubel
8b8a8f7b4e
Report error for invalid this/super in initializer
...
Fix https://github.com/dart-lang/sdk/issues/36262
Change-Id: I20b0997f58a2835b87869952f186fbe83bfe5e3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97404
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-03-22 01:43:13 +00:00
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
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
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
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
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
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
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
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
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
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
eeb19b0416
Remove usages of ExtensionManager and package:plugin in general.
...
R=brianwilkerson@google.com
Change-Id: I489e72464474b3d40d7678f44562f65934f93288
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96863
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-03-14 15:31:08 +00:00
Mike Fairhurst
1bd7920367
Resolve generic function default parameter values
...
Change-Id: I060ee8f61b8cb74482b92d4057e4183f1e4ca269
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96701
Commit-Queue: Mike Fairhurst <mfairhurst@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Auto-Submit: Mike Fairhurst <mfairhurst@google.com >
2019-03-13 22:44:18 +00:00
Konstantin Shcheglov
078c834f25
Extract CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS test and fix for spreads in sets.
...
R=brianwilkerson@google.com
Change-Id: I1667d6bdde78a35a542f2ec525d5328573322600
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96830
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-03-13 21:31:31 +00:00
Konstantin Shcheglov
f08e213bb1
Extract CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS tests.
...
R=brianwilkerson@google.com
Change-Id: Ic73cdade894f4d5832427d193eaa0c33e51676b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96825
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-03-13 19:28:34 +00:00
Konstantin Shcheglov
81fa14eb3c
Hollow out AnalysisContextImpl.
...
R=brianwilkerson@google.com
Change-Id: I4ebc67de74cc4bbda63c9f0a8f7c11dbc3f25b21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96720
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-03-13 15:18:22 +00:00
Brian Wilkerson
4a7556840f
Rename tests ending with Test_Driver
...
Change-Id: I1b4822630a2508e8a41ba6c5564eae5a54f56622
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96740
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-03-13 13:38:22 +00:00
Paul Berry
ba3b9b3b65
Sort static_type_analyzer_test.dart
...
Change-Id: I4767ea98e947279d1af5d4295d1c8e66c02dee80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96660
Auto-Submit: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2019-03-12 14:59:42 +00:00
Paul Berry
9e5cf6b09e
Improve set/map/list literal type checking.
...
We now exclusively use StaticWarningCode.*_TYPE_NOT_ASSIGNABLE to
report static errors.
CheckedModeCompileTimeErrorCode.*_TYPE_NOT_ASSIGNABLE is reserved for
future use when #21119 is fixed.
Change-Id: I681b1253417a135272361306cb3468dd9590b17b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96200
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-03-09 13:43:26 +00:00
Paul Berry
73be247e12
Eliminate uses of old AST node types from pkg/analyzer/lib/src/generated
...
Change-Id: Icba5f914248124909e38091f846054de8924adc8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/94993
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-03-08 21:04:20 +00:00
Paul Berry
8430281a6b
Add an implementation of ScopedVisitor.visitForEachPartsWithDeclaration.
...
Change-Id: I659609caa84e837801a0a38871c8bb8bb0c8948c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96121
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-03-08 18:58:58 +00:00
danrubel
b2cb604b9d
improve literal list/map/set control flow recovery
...
* new ExpectedElseOrComma parser error code
* update recovery tests to enable control flow recovery
* rework test to call parser.parseLiteralListSuffix rather than parser.parseLiteralListSuffix
Fix https://github.com/dart-lang/sdk/issues/36141
Change-Id: I5bdee19eb3828de8fbdc514a3820afaa1309df99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-03-08 17:31:33 +00:00
Brian Wilkerson
9b0ac9ee03
Extract diagnostic tests in preparation for supporting ui-as-code features
...
Change-Id: Icfeb982a37b501b22189d87de42398c3f1516bee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95961
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-03-08 02:10:47 +00:00
Sam Rawlins
05be278603
Split MISSING_RETURN tests
...
Change-Id: I001d3dd2f1c2d1200ede738aa8d838fc0924ba1a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95960
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2019-03-08 00:32:17 +00:00
Sam Rawlins
bc02b6ce7d
Split DEAD_CODE tests into their own file
...
Change-Id: I7d550ec240a10b839791cb5e00216c739af12d8c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95666
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-03-07 18:28:37 +00:00
danrubel
309140693c
Revise non-nullable flag from AstBuilder to ErrorVerifier
...
This is one step in refactoring non-nullable enablement
* update AstBuilder to record isNonNullable in CompilationUnitImpl
* update ErrorVerifier to pull non-nullable from CompilationUnitImpl
Change-Id: I78e5f529330f10f294ad1c1b3b7ac8b672a5ee9b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95426
Commit-Queue: Dan Rubel <danrubel@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-03-07 13:29:45 +00:00
Paul Berry
0124541d5f
Deprecate AST data structures that will be obseleted by the "UI as code" feature
...
- ForStatement and ForEachStatement will be replaced by ForStatement2.
- MapLiteral and SetLiteral will be replaced by SetOrMapLiteral.
To ease the transition, the old classes are subtypes of the new
classes, so even though the analyzer still creates instances of the
old classes, clients should be able to start referring to the new
classes in their code. The analyzer will stop creating instances of
MapLiteral and SetLiteral when the experimental flags for the "UI as
code" feature are turned on, and will stop creating instances of all 4
classes when we bump the major version number (which should happen
sometime in March).
For visitors, we've updated the base classes with the following default methods:
visitForStatement(node) => visitForStatement2(node);
visitForEachStatement(node) => visitForStatement2(node);
visitMapLiteral(node) => visitSetOrMapLiteral(node);
visitSetLiteral(node) => visitSetOrMapLiteral(node);
So clients should be able to start revising their visitors to override
the new visit methods rather than the old ones, and the visit methods
in the base classes will automatically forward to the new visit
methods.
Change-Id: Ifde3a2aa3c8c49ce4e65dfaabf086db4dabb73f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95665
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2019-03-06 21:43:50 +00:00
Paul Berry
ba5644b76c
Fix handling of closures containing type promotions in variables with inferred types.
...
Promotion analysis requires the localVariableInfo data structures to
be set; these are set by the VariableResolverVisitor. So we need to
ensure that this visitor runs prior to type inference.
Change-Id: I579301beb101f32a1965f9eb8f07b1196d232b8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95422
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2019-03-06 17:16:19 +00:00
Paul Berry
47b417c88e
Remove FindNode methods related to AST data structures that will be removed.
...
ForStatement and ForEachStatement will be removed in favor of
ForStatement2. MapLiteral and SetLiteral will be removed in favor of
SetOrMapLiteral. This CL changes FindNode methods to match, and
adjusts callers.
Change-Id: I89990f63aa277acd31458d485e897ebf0c6cf61f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95421
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2019-03-05 20:39:41 +00:00
Konstantin Shcheglov
927e758e96
Stop using package:html in analyzer.
...
Related to https://github.com/dart-lang/sdk/issues/35802
R=brianwilkerson@google.com
Change-Id: I875a8dc657900137c5a7b59f2820b30a81b23405
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95480
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-03-05 18:36:41 +00:00
Dan Rubel
58a0487125
more tests for 34610 and 36009
...
https://github.com/dart-lang/sdk/issues/34610
https://github.com/dart-lang/sdk/issues/36009
Change-Id: I840047fe53fe99b0e2c8b778a84b0598334ab295
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95420
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-03-05 18:00:31 +00:00
danrubel
96e982f054
Improve await-outside-async error recovery
...
Fix https://github.com/dart-lang/sdk/issues/36048
Change-Id: If40baa44a0aefa301c042bc1002d92e577bd3b9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95302
Reviewed-by: Dan Rubel <danrubel@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-03-05 17:08:31 +00:00
Dan Rubel
e033b676dd
fix parser crash in unterminated string literal inside unterminated interpolation
...
Fix https://github.com/dart-lang/sdk/issues/35900
Change-Id: I96d83e0c93d9e9c22d5b30048dc210672b1c003c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95043
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-03-05 15:35:58 +00:00
Brian Wilkerson
c86a9ece5f
First cut at upward inference for the ui-as-code features
...
Change-Id: I5d63e9433deed3baa1a2df44e04b57782da6c9b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95062
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-03-04 22:00:46 +00:00
Mike Fairhurst
a7a4c95df7
Summarize SetOrMapLiteral
...
Change-Id: Ic0356500fc9381a05bc91fb8bd9bead877de01cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/94348
Commit-Queue: Mike Fairhurst <mfairhurst@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Auto-Submit: Mike Fairhurst <mfairhurst@google.com >
2019-03-04 21:47:21 +00:00
Paul Berry
62df51cb34
Eliminate uses of old AST node types from parts of the analyzer
...
This CL covers the following subdirectories:
- pkg/analyzer/test/dart/element
- pkg/analyzer/test/generated
Change-Id: If550fef4c625efca7a295d59fbe08f6b5be4407f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95261
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2019-03-04 19:19:13 +00:00
Brian Wilkerson
f00fe7a289
Rework of downward inference for the ui-as-code features
...
Change-Id: Idfc815d976343a6ad015beaa6074ca5c979f8c3b
Reviewed-on: https://dart-review.googlesource.com/c/94700
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2019-03-01 19:23:36 +00:00
Paul Berry
644026da51
Eliminate uses of old AST node types from AstFactory
...
Change-Id: I6bfb37b9a1e1477a27e5a60ba6120876ae5ecb9d
Reviewed-on: https://dart-review.googlesource.com/c/94804
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2019-03-01 18:03:25 +00:00
Paul Berry
a2eac98753
Merge HintCodeTest_Driver into HintCodeTest.
...
This is necessary because the internal code base considers a test file
to fail if it doesn't run any tests.
Alternative fixes considered:
- Put a dummy test in hint_code_test.dart
- Rename hint_code_test.dart to a name that doesn't end in _test.dart
Change-Id: I64fa2be7c76b4d2a85ee9b46ba1a1c21ae2903ae
Reviewed-on: https://dart-review.googlesource.com/c/94800
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2019-02-28 17:50:09 +00:00
Dan Rubel
d650c619e2
more postfix "!" non-null assert operator tests
...
Address comments in https://dart-review.googlesource.com/c/sdk/+/94580
Change-Id: I1a337f967753f0269ec23c37f0714b77ebe14d4b
Reviewed-on: https://dart-review.googlesource.com/c/94640
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-02-27 22:02:10 +00:00
Dan Rubel
8f12d634fe
add postfix "!" non-null assert operator
...
This updates the parser to support a new "!" postfix assert non-null
operator for NNBD experimentation in analyzer. All other CFE listeners
report an error as they always have... albet a slightly different error.
This also updates reportErrorIfNullableType to report experiment-not-enabled
Change-Id: I7751443fd5a7a2756e823f38c78120e9c2e3e075
Reviewed-on: https://dart-review.googlesource.com/c/94580
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-02-27 19:20:22 +00:00