Brian Wilkerson
6712dca7d8
Fix the test used to differentiate between empty sets and empty maps
...
Change-Id: I128c356cee02397ff7f5ee9030f3c2de95dfbce9
Reviewed-on: https://dart-review.googlesource.com/c/88741
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Leaf Petersen <leafp@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-01-10 16:28:14 +00:00
Konstantin Shcheglov
0109e39ca4
Report INVALID_ASSIGNMENT for prefix/postfix increment decrement when the result is not assignable to the operand.
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I83a732c039c1c83599c068a1944c5dd1040c3fd5
Reviewed-on: https://dart-review.googlesource.com/c/88880
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-01-10 05:51:15 +00:00
Mike Fairhurst
ca9ea997bd
Fix old treatment of {}, enable set literals tests
...
Change-Id: Iec319cb735a3747e64561f3865cce2f08fb2be0f
Reviewed-on: https://dart-review.googlesource.com/c/88601
Commit-Queue: Mike Fairhurst <mfairhurst@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2019-01-10 01:38:34 +00:00
Konstantin Shcheglov
d09c1265e9
Issue 35467. Move ast_type_matchers/element_type_matchers into test/util/.
...
R=brianwilkerson@google.com , paulberry@google.com
Fixes https://github.com/dart-lang/sdk/issues/35467
Change-Id: I2aab476e2e88f5bdbf5e62a2104ff7d271a73209
Reviewed-on: https://dart-review.googlesource.com/c/88780
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-01-09 04:46:39 +00:00
Brian Wilkerson
e9eb4842ea
Remove the unused hint code INVALID_ASSIGNMENT
...
Change-Id: I4b3aff6b53dcfb5d5f00c49992050e08e5b52002
Reviewed-on: https://dart-review.googlesource.com/c/88641
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-01-08 19:15:47 +00:00
Sam Rawlins
9dbb6fb113
Add a Hint enforcing contract of @literal
...
Example code:
```dart
import 'package:meta/meta.dart';
class A {
@literal
const A();
@literal
const A.named();
}
var a = A();
var b = const A();
const c = A();
var d = new A();
var e = new A.named();
```
Produces:
Analyzing b.dart...
hint • This instance creation must be 'const', because the A constructor is marked as '@literal' at b.dart:11:9 • non_const_call_to_literal_constructor
hint • This instance creation must be 'const', because the A constructor is marked as '@literal' at b.dart:14:9 • non_const_call_to_literal_constructor
hint • This instance creation must be 'const', because the A.named constructor is marked as '@literal' at b.dart:16:9 • non_const_call_to_literal_constructor
3 hints found.
Bug: https://github.com/dart-lang/sdk/issues/34259
Change-Id: Iba10e5e0a0b2d0f7e99556cd6c201cea229ad675
Reviewed-on: https://dart-review.googlesource.com/c/88422
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2019-01-08 17:20:05 +00:00
danrubel
2cb346bd0c
Add support for parsing complex nullable types
...
Change-Id: I38a59f96e299387b7266e46082d876105eb60f1e
Reviewed-on: https://dart-review.googlesource.com/c/88640
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-01-08 15:52:54 +00:00
Konstantin Shcheglov
3cec3dd5bf
Issue 35548. Don't report CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD when mixin has a static field.
...
R=brianwilkerson@google.com
Bug: https://github.com/dart-lang/sdk/issues/35548
Change-Id: I46a2006574e31505a860a9e54640b643bb514ae7
Reviewed-on: https://dart-review.googlesource.com/c/88600
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-01-07 22:32:53 +00:00
Konstantin Shcheglov
b2ace8fa61
Add hasPragmaAnalyzerNonNullable to AstBuilder and CompilationUnitImpl.
...
Start integration testing for non-nullable types.
Just interface type, and just parsing for now. Obviously we cannot
start working on resolver until the CL with `nullability` is landed.
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I8fe70c29b25fad56739a549b09a235a83f9960e7
Reviewed-on: https://dart-review.googlesource.com/c/88434
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Dan Rubel <danrubel@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-01-07 19:39:28 +00:00
Brian Wilkerson
555485c891
Start splitting out the tests for hint codes
...
Change-Id: I2d221aa024b6db9426d7adf6b38c17da0be599d9
Reviewed-on: https://dart-review.googlesource.com/c/88541
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-01-07 14:25:20 +00:00
Brian Wilkerson
cb61275708
Remove remaining uses of Null as a type argument from analyzer
...
Change-Id: I6022fbc18c002447278ec8dc0e2b24d3eb369a49
Reviewed-on: https://dart-review.googlesource.com/c/88436
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-01-05 19:26:07 +00:00
Brian Wilkerson
c39a58a9fe
Generate an error if a constant set contains two elements with the same value
...
Change-Id: Ie359a1ea639e9c928df32c727bcd2f075f92033f
Reviewed-on: https://dart-review.googlesource.com/c/88425
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-01-05 15:13:12 +00:00
Mike Fairhurst
88b1a9d241
Remove hack; test fix for #35441
...
Change-Id: I9505598e904e4ee39b00cbae87082f5f332f3505
Reviewed-on: https://dart-review.googlesource.com/c/87612
Commit-Queue: Mike Fairhurst <mfairhurst@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-01-05 03:52:34 +00:00
Brian Wilkerson
80fa1a874d
Replace more uses of deprecated elements
...
Change-Id: Ied014ca1d8cbf5917b5e3d15d0892e2e02257ccf
Reviewed-on: https://dart-review.googlesource.com/c/88423
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-01-04 18:35:53 +00:00
danrubel
2111f507bd
rework parsing local variable declaration with nullable type
...
... and address comment in https://dart-review.googlesource.com/c/sdk/+/88301
Change-Id: I96c9bcf995fad58403ab455e907843a40339ef84
Reviewed-on: https://dart-review.googlesource.com/c/88303
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Dan Rubel <danrubel@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-01-03 19:53:32 +00:00
Sam Rawlins
ce256c762c
Impl of INVALID_LITERAL_ANNOTATION
...
Bug: https://github.com/dart-lang/sdk/issues/34259
Change-Id: Ia5ca627a89dcb3f0fcd5ce74048df8fdf9dd9c9c
Reviewed-on: https://dart-review.googlesource.com/c/88283
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-01-03 18:07:44 +00:00
danrubel
c442539619
Remove fasta parser listener.beginExpressionStatement
...
... and rename endExpressionStatement to handleExpressionStatement.
This is needed for the next step in NNBD.
Change-Id: Ibed51f15a4e2d93d2b16a50e4e22e912f22d2171
Reviewed-on: https://dart-review.googlesource.com/c/88301
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-01-03 15:49:18 +00:00
Aske Simon Christensen
7475080928
Enable set literals by default in the parser
...
Change-Id: I854a7d35b05f95d05f0b13f67677d2e512db4eeb
Reviewed-on: https://dart-review.googlesource.com/c/87844
Commit-Queue: Aske Simon Christensen <askesc@google.com >
Reviewed-by: Peter von der Ahé <ahe@google.com >
Reviewed-by: Dan Rubel <danrubel@google.com >
2019-01-03 13:45:36 +00:00
Sam Rawlins
31fa815dca
Remove sealed ability on mixin
...
Change-Id: I69f59dfaa18d77fcd53f82b71a79c567102a9b66
Reviewed-on: https://dart-review.googlesource.com/c/88200
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-01-03 01:51:35 +00:00
Sam Rawlins
0d744a51da
Allow and enforce @immutable on mixins and mixin applications
...
Bug: https://github.com/dart-lang/sdk/issues/35459
Change-Id: I094e12ec997a63fee65ff7a783ab112a11930af9
Reviewed-on: https://dart-review.googlesource.com/c/88223
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2019-01-03 00:11:40 +00:00
Sam Rawlins
428629efd8
Enforce sealed annotation on classes and mixins
...
This CL replaces https://dart-review.googlesource.com/c/sdk/+/75941
(there were some large refactorings, and I got a new laptop and lost my Git repo)
Bug: https://github.com/dart-lang/sdk/issues/34232
Change-Id: Ia0746b94a23ccb757bc209e76098243896be8c55
Reviewed-on: https://dart-review.googlesource.com/c/88127
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-01-02 18:07:52 +00:00
Brian Wilkerson
737209b85c
Remove some unused hint codes
...
Change-Id: I1388355e7832dec17ed06da14262573ea4e60eef
Reviewed-on: https://dart-review.googlesource.com/c/88161
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-12-31 16:23:28 +00:00
danrubel
f0377b2f92
Add support for parsing simple nullable types
...
... as part of adding NNBD as outlined in
https://github.com/dart-lang/language/issues/110
This only supports parsing simple nullable types
such as int? and List<int>? while subsequent CLs
will add support for parsing more complex types.
Due to current parser limitations, it also only supports
nullable types in a limited number of statements such as
T? t;
if (x is String?) {}
In addition, address comments in
* https://dart-review.googlesource.com/c/sdk/+/87880
* https://dart-review.googlesource.com/c/sdk/+/87881
Change-Id: Ife4afadc0b72906fc0c4e9b1977ad838041c2a84
Reviewed-on: https://dart-review.googlesource.com/c/87920
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-12-21 12:36:07 +00:00
Dan Rubel
096e734b05
Replace //@NNBD with @pragma(analyzer:non-nullable*)
...
Change-Id: I90a8a23601c7939e400ecadd5f14ac0b4caf2e39
Reviewed-on: https://dart-review.googlesource.com/c/87881
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-12-20 21:13:37 +00:00
Dan Rubel
a80d93c81f
Add global analyzer non-nullable flag
...
... and plumb that flag through to the AstBuilder.
In addition, remove parser.parseSetLiterals flag in favor of enableSetLiterals
and update callsites
Change-Id: I10dcac0b3df3d0888844e4bf56977c80e03d6334
Reviewed-on: https://dart-review.googlesource.com/c/87880
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-12-20 21:06:17 +00:00
Sam Rawlins
ac506a9d92
Check for @immutable on mixin application. Fixes #35458
...
Bug: https://github.com/dart-lang/sdk/issues/35458
Change-Id: I884a64784dea370cf7f8df65a6e44d2287178677
Reviewed-on: https://dart-review.googlesource.com/c/87708
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2018-12-19 23:38:16 +00:00
Konstantin Shcheglov
2a323d6afe
Fix adding implicit casts when the target method is in a superclass.
...
This fixes the internal failure with DDC and Angular components.
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I3dac518be9f2f6b1b05149a471ca81fe544379ce
Reviewed-on: https://dart-review.googlesource.com/c/87702
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-12-19 21:59:44 +00:00
Brian Wilkerson
2bd60aa109
Clean up uses of DartType.flattenFutures
...
Change-Id: I21a950f8be4035a1aacda0c46b64754d22dc60f6
Reviewed-on: https://dart-review.googlesource.com/c/87610
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-12-18 23:03:15 +00:00
Brian Wilkerson
554f0c9d36
Clean up the use of the experimental flags in tests
...
Change-Id: Idef19865c1ce8b514cd2520ad030f56be11c0d5a
Reviewed-on: https://dart-review.googlesource.com/c/87604
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2018-12-18 21:18:06 +00:00
danrubel
4163478f9b
Update AstBuilder to build AST with nullable types
...
... as part of adding NNBD as outlined in
https://github.com/dart-lang/language/issues/110
This CL updates the parser to recognize two specialized comments at the
beginning of a library of the form '//@NNBD' and '//@NNBD*' for use
by the analyzer to aid developers when converting their libraries
to be non-nullable by default.
In addition, the AstBuilder now populates the generated analyzer AST
with nullable type information.
Change-Id: I80d221dd138973aa32f05bde631245d9ac6ee10f
Reviewed-on: https://dart-review.googlesource.com/c/87540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-12-18 16:31:13 +00:00
Brian Wilkerson
0fb5974ba0
Improve the error reporting when the same-named types are used as type arguments (issue 33946)
...
Change-Id: Ic83dea89e4ad51d923f1d147fe4c54e129549fa8
Reviewed-on: https://dart-review.googlesource.com/c/87425
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2018-12-17 21:10:34 +00:00
danrubel
e54ae42106
Add more conditional expression parser tests
...
This also addresses a comment in https://dart-review.googlesource.com/c/sdk/+/87083
Change-Id: Id2398bdf0e2ece76c74e0b0afdb6aa166dd687ac
Reviewed-on: https://dart-review.googlesource.com/c/87340
Commit-Queue: Dan Rubel <danrubel@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-12-17 03:23:06 +00:00
Mike Fairhurst
91cd0b4b83
Test that e2e constant is check works, pass experiments around more
...
Change-Id: I6252d9215ab322c75a5b83ac0a3047a9dc90a360
Reviewed-on: https://dart-review.googlesource.com/c/87420
Commit-Queue: Mike Fairhurst <mfairhurst@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-12-15 00:15:47 +00:00
Konstantin Shcheglov
162d0d12b0
Remove EngineTestCase.assertInstanceOf and extract ast/element TypeMatcher(s).
...
R=brianwilkerson@google.com
Change-Id: I9c47b4a7426dccafb8d3ffc1b0652da0106f2184
Reviewed-on: https://dart-review.googlesource.com/c/87302
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-12-14 17:51:27 +00:00
danrubel
e2007126eb
Revert support for simple nullable type return value in generalized function type
...
This reverts commit 11d081d115
Reason for revert: Breaks parsing less common conditionals (e.g. b ? c = true : g();)
Original change's description:
> Add support for simple nullable type return value in generalized function type
>
> This only supports nullable return values of the form
>
> <identifier> '?' 'Function' '(' ...
>
> This is an increment CL in the ongoing effort to add nullable type support
> as outlined in https://github.com/dart-lang/language/issues/110
Change-Id: I99bce29619d4e448193e3c81fa86a982791b1f77
Reviewed-on: https://dart-review.googlesource.com/c/87283
Reviewed-by: Dan Rubel <danrubel@google.com >
2018-12-14 16:48:18 +00:00
Dan Rubel
6376482e20
Revert "Add support for prefixed nullable type"
...
This reverts commit 7720689931 .
Reason for revert: Breaks parsing less common conditionals (e.g. b ? c = true : g();)
Original change's description:
> Add support for prefixed nullable type
>
> This adds support for nullable types of the form
>
> <identifier> '.' <identifier> '?'
>
> and
>
> <identifier> '.' <identifier> '?' 'Function' '(' ...
>
> This is an increment CL in the ongoing effort to add nullable type support
> as outlined in https://github.com/dart-lang/language/issues/110
>
> Change-Id: I526aecbe64bacbd442cea0b4c52d36ff23b0443b
> Reviewed-on: https://dart-review.googlesource.com/c/87083
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
> Commit-Queue: Dan Rubel <danrubel@google.com >
TBR=brianwilkerson@google.com ,danrubel@google.com
Change-Id: Ib5e74b4aad239f561a33eae9d95dffa2693037f7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/87282
Reviewed-by: Dan Rubel <danrubel@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-12-14 15:12:51 +00:00
danrubel
7720689931
Add support for prefixed nullable type
...
This adds support for nullable types of the form
<identifier> '.' <identifier> '?'
and
<identifier> '.' <identifier> '?' 'Function' '(' ...
This is an increment CL in the ongoing effort to add nullable type support
as outlined in https://github.com/dart-lang/language/issues/110
Change-Id: I526aecbe64bacbd442cea0b4c52d36ff23b0443b
Reviewed-on: https://dart-review.googlesource.com/c/87083
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-12-13 23:24:04 +00:00
Dan Rubel
11d081d115
Add support for simple nullable type return value in generalized function type
...
This only supports nullable return values of the form
<identifier> '?' 'Function' '(' ...
This is an increment CL in the ongoing effort to add nullable type support
as outlined in https://github.com/dart-lang/language/issues/110
Change-Id: I42febae9f88f7e4d8b05907988deab97c7a7425c
Reviewed-on: https://dart-review.googlesource.com/c/87081
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-12-12 19:13:24 +00:00
Dan Rubel
1ff82c5081
Update endFunctionType event to take questionMark token
...
... which in this CL will always null.
This is another step when adding NNDB support as outlined in
https://github.com/dart-lang/language/issues/110
Change-Id: I3974fcb885c63be4af9d1007258383f3f8191ae0
Reviewed-on: https://dart-review.googlesource.com/c/87080
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-12-12 16:10:23 +00:00
Brian Wilkerson
6fe24162eb
Implement downward inference for set literals
...
Change-Id: I21458e79a2c7127675c7d50ba0726c7b0bd29493
Reviewed-on: https://dart-review.googlesource.com/c/86980
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-12-11 20:01:08 +00:00
Paul Berry
5768e513f8
Rework analyzer representation of experimental flags to prepare for codegen.
...
This CL introduces
pkg/analyzer/lib/src/dart/analysis/experiments_generated.dart, which
will eventually be code generated from a YAML description of the
currently-allowed set of experimental flags.
Change-Id: Iabbefa8e5037573d4b4e7b7b4eb661c1698bd673
Reviewed-on: https://dart-review.googlesource.com/c/86220
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-12-10 22:32:24 +00:00
Dan Rubel
089f098849
Auto generate more analyzer error codes
...
* MISSING_CATCH_OR_FINALLY
* STACK_OVERFLOW
* INVALID_OPERATOR_FOR_SUPER
* VAR_AND_TYPE
Change-Id: Ib308cd979f9c5644c28ab1f927fa9cc8add38269
Reviewed-on: https://dart-review.googlesource.com/c/86462
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-12-07 11:46:48 +00:00
Brian Wilkerson
2118fcf7b0
Rename StrongTypeSystemImpl
...
Change-Id: I394bd9bfa2b6d9ceeb87312e94a3e315e32846a1
Reviewed-on: https://dart-review.googlesource.com/c/86282
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2018-12-05 22:22:36 +00:00
Brian Wilkerson
e4c83f8573
Rename the experiment flag used to enable set literals
...
Change-Id: I3cd3e1637afbac4bb4f60bec4256afb5b611bd63
Reviewed-on: https://dart-review.googlesource.com/c/86281
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-12-05 21:50:24 +00:00
Brian Wilkerson
21984a350d
Implement evaluation for constant expressions that use the >>> operator
...
Change-Id: Ie1e3dcde265e80da4c0e102309a6b06d185586e6
Reviewed-on: https://dart-review.googlesource.com/c/86247
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2018-12-05 20:52:43 +00:00
Paul Berry
670f9ab49b
Merge commit '65401da92251a7318e3264b816ce0c4e14701751' into analyzer
2018-12-04 15:38:21 -08:00
danrubel
848d93c0b5
Improve parser recovery given superclass field initializer
...
This improves upon the patch in
https://dart-review.googlesource.com/c/sdk/+/85780
to better recover given malformed constructor initializer such as
C() : super = 42;
and
C() : super.a = 42;
This also add a new FieldInitializedOutsideDeclaringClass error code
to better indicate the problem and how the user should fix it.
Change-Id: I4476c6c9fac20b0dd47970c2c81078a5c441bde1
Reviewed-on: https://dart-review.googlesource.com/c/85781
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-12-04 21:27:13 +00:00
danrubel
f363c5fe79
Update AstBuilder to recover given superclass field initializer
...
Fix https://github.com/dart-lang/sdk/issues/35151
Change-Id: Ia21d621eb8c768b465ad32a1289b7a5e34fe77f0
Reviewed-on: https://dart-review.googlesource.com/c/85780
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-12-04 21:27:13 +00:00
Paul Berry
63770042aa
Merge commit '80c23f87a3e3123d7e337c1fc8bc3b5ec49b34a0' into analyzer
2018-11-30 08:12:45 -08:00
danrubel
80c23f87a3
Update more analyzer error codes to be generated
...
This updates more analyzer error codes to be generated
from the corresponding CFE error code.
Several of these analyzer error codes had multiple CFE error
codes mapped to them. In these situations, new analyzer error
codes were added to match the existing CFE error codes:
* EXTERNAL_FACTORY_WITH_BODY
* EXTERNAL_FACTORY_REDIRECTION
* CATCH_SYNTAX_EXTRA_PARAMETERS
Change-Id: Ib1cbb9e04d2092e4859e2cfadbcc85e03093f808
Reviewed-on: https://dart-review.googlesource.com/c/85431
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-11-30 15:00:36 +00:00