Brian Wilkerson
9559e4d444
Initial documentation for a small sample of diagnostics and a script to generate a markdown file containing that documentation
...
Change-Id: I06602a29c95829b42add1d655ad8d7190ae7100a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105141
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-06-07 22:31:16 +00:00
Brian Wilkerson
30390c6ba1
Prepare to compute the documentation URL for diagnostics
...
Change-Id: Ib1b7e4887e18b90c1552f3f8501948ee8d8d2c1f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105260
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-06-06 16:41:46 +00:00
Brian Wilkerson
556c9134ac
Update the SDK version associated with constant update hints
...
Change-Id: Id082dcfbbbf19672c8bc036161326a15c8f9d9f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104260
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-05-30 18:22:16 +00:00
danrubel
fee615c5a5
consolidate multiple modifier error codes
...
This consolidates the following error codes into MODIFIER_OUT_OF_ORDER
* COVARIANT_AFTER_VAR
* EXTERNAL_AFTER_CONST
* EXTERNAL_AFTER_FACTORY
* EXTERNAL_AFTER_STATIC
* STATIC_AFTER_CONST
* STATIC_AFTER_FINAL
* STATIC_AFTER_VAR
Change-Id: I3f8c41bacc65ebc5d9255806cbee89cddb5ffeb1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103880
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Auto-Submit: Dan Rubel <danrubel@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-05-28 17:01:16 +00:00
Dan Rubel
ec1ddcdb83
improve extension message missing body error message
...
This improves the missing class, mixin, and extension method body
error messages and lays the groundwork for improving other
missing body error messages such as switch statement, finally clause,
and others.
Change-Id: I0a4d1338fe91eee3cfe7d61652e168df1302d212
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103570
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-05-24 17:03:25 +00:00
Lasse R.H. Nielsen
eca6c8953f
Allow async as an identifier everywhere.
...
Fixes #37063
Bug: http://dartbug.com/37063
Change-Id: I2253c3088fbe33eca1072f2480cf0cf3cc363362
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103524
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Leaf Petersen <leafp@google.com >
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com >
2019-05-24 08:21:14 +00:00
Brian Wilkerson
f80f0bfcfd
Reland "Implement the type Never"
...
This reverts commit 78e50a5f9b .
Change-Id: I2ec4cdcfda4a6d199308a3b25a2ed0792e9d9a26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101621
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-05-08 13:26:45 +00:00
Brian Wilkerson
78e50a5f9b
Revert "Implement the type Never"
...
This reverts commit 40a06c3a77 .
Reason for revert: Introduced a bug that is blocking a roll.
Original change's description:
> Implement the type Never
>
> Change-Id: Icbf407bc19f602c8382946b1e735905cc165c59c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100993
> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
> Reviewed-by: Paul Berry <paulberry@google.com >
TBR=paulberry@google.com ,scheglov@google.com ,brianwilkerson@google.com ,mfairhurst@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: Iebb5b8327b0be7129298f39b343555b812314abf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101640
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-05-07 16:22:37 +00:00
Sam Rawlins
209e135db6
Split out two codes from STRICT_RAW_TYPE
...
Bug: https://github.com/dart-lang/sdk/issues/36445
Change-Id: Ic716d89b1a6d00945a74c7484f8301403b8ea371
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2019-05-06 16:33:58 +00:00
Brian Wilkerson
40a06c3a77
Implement the type Never
...
Change-Id: Icbf407bc19f602c8382946b1e735905cc165c59c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100993
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2019-05-02 16:31:23 +00:00
danrubel
81b028de78
cleanup some error codes
...
* replace CovariantAfterFinal with ModifierOutOfOrder
* replace ConstAndCovariant with ConflictingModifiers
Change-Id: If09551a28d4bffecaf009b4e836a67dfc939c0bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100140
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-04-23 14:22:12 +00:00
danrubel
6384f629c0
new conflicting-modifiers error code
...
This adds a new "conflicting modifiers" error code for new NNBD
modifier errors and replaces the existing "const and var" error
code with the new error code.
Change-Id: I1997bbb7f66e62d2de3c5042b6ea85861f2e00d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-04-18 16:44:08 +00:00
Dan Rubel
80dd5ca3d4
new "modifier out of order" error code
...
This replaces the const-after-factory error code
with a more general modifier-out-of-order error code.
Change-Id: I71baf2c96656241475c344cb33b887d8e0d456fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99481
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-04-16 19:28:55 +00:00
Paul Berry
f3dbfee467
Fix the error message template for EXPERIMENT_NOT_ENABLED.
...
Given an experiment named foo, it doesn't make sense to ask the user
to enable experiment --foo, since that's not the syntax for enabling
an experiment (the syntax is --enable-experiment=foo). Changed to
'foo'.
Change-Id: I055461fb389a4338578fc7f260e252b8e3fe9a13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99286
Reviewed-by: Dan Rubel <danrubel@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2019-04-13 16:19:23 +00:00
Sam Rawlins
e89850f95d
Move STRICT_RAW_TYPE on constructors to INFERENCE_FAILURE_ON_INSTANCE_CREATION
...
Bug: https://github.com/dart-lang/sdk/issues/33749 https://github.com/dart-lang/sdk/issues/36445
Change-Id: Ic34f0e07b1cc5cbbc265ab2c32cabc61d7901c0f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99264
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2019-04-12 23:51:21 +00:00
Sam Rawlins
b857d53e7e
Re-work collection literal strict-raw-type to strict-inference
...
Bug: https://github.com/dart-lang/sdk/issues/36445 https://github.com/dart-lang/sdk/issues/33749
Change-Id: I127d671840bfcfe3857225932164fa4098963715
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99085
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-04-11 16:20:06 +00:00
Brian Wilkerson
e58a8fade5
Fix typos in the diagnostic messages
...
Change-Id: I65a11e52933c37a63cb9d0a14b1961a20e16271f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98600
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-04-04 13:47:40 +00:00
danrubel
fe2d66006d
improve type-before-factory error message
...
Address comment in https://dart-review.googlesource.com/c/sdk/+/98449
Change-Id: I38e7cf04e2061dbd6c9b37cca713e8420a1e021d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98520
Commit-Queue: Dan Rubel <danrubel@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-04-03 16:30:18 +00:00
Brian Wilkerson
0560014c79
Remove unused error codes
...
Change-Id: I47daa6dab610af657ca781db5ca88438988c3c87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98162
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Mike Fairhurst <mfairhurst@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-03-29 15:37:26 +00:00
danrubel
36e6eb36c5
rename and reword invalid initializer error messages
...
Change-Id: Ieae7b11f6aee46567247dbc9532098e7541774b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97720
Commit-Queue: Dan Rubel <danrubel@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-03-23 15:59:43 +00:00
Brian Wilkerson
9c6a882af0
Add SDK constraint checks for the constant update 2018 features
...
Change-Id: I308a32de5e73a93d8dead38ab45c130f88ef706d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97567
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-03-22 20:09:01 +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
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
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
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
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
Jenny Messerly
5a335957f2
[analyzer] fix #33119 , add strict-raw-types flag
...
When the flag is enabled, warnings are issued for raw types, for
example `List`.
Raw types (those without explicit type arguments) are allowed if any
of these are true, otherwise they are reported:
- none of the type arguments are `dynamic`.
- the type was inferred from a downwards context.
- the class/typedef has `@optionalTypeArgs` from package:meta.
Change-Id: I1e70dba5b3bf6118b274bbf72843e3578dbaa8fd
Reviewed-on: https://dart-review.googlesource.com/c/75629
Auto-Submit: Jenny Messerly <jmesserly@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2019-03-02 00:02:01 +00:00
danrubel
7829012e61
add new ExperimentNotEnabled error code
...
Change-Id: I541015db1f200de3f3846d7bd231b1996f947c6e
Reviewed-on: https://dart-review.googlesource.com/c/94420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-02-27 15:40:17 +00:00
Sam Rawlins
372537f1e4
Add first support for strict-inference as an analysis option.
...
The first code is HintCode.INFERENCE_FAILURE_ON_UNINITIALIZED_VARIABLE:
```dart
var a; // Hint: The type of v1 cannot be inferred without a type or initializer
dynamic b; // OK
var c = 7; // OK
```
This is currently only enabled via an analysis options file:
```yaml
analyzer:
language:
strict-inference: true
```
I could add it as a flag as well, but to start using this internally at Google,
we only need support in the analysis options file.
Bug: https://github.com/dart-lang/sdk/issues/33749
Change-Id: Id2a6afa7c3d724b44c20576c7f48869abcf4255c
Reviewed-on: https://dart-review.googlesource.com/c/93700
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-02-21 17:28:19 +00:00
Mike Fairhurst
48a9eb87ba
[analyzer] Add hint for unnecessary ?.
...
Change-Id: I7a8532d353b1840332b7583a1884e6487a7656bf
Reviewed-on: https://dart-review.googlesource.com/c/92381
Commit-Queue: Mike Fairhurst <mfairhurst@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-02-20 22:35:49 +00:00
Sam Rawlins
25cefbdad7
Add HintCode.INVALID_VISIBILITY_ANNOTATION. Fixes #35141
...
Bug: https://github.com/dart-lang/sdk/issues/35141
Change-Id: Ifa8401e4ab772390c94d03a485ed7d07f43aff55
Reviewed-on: https://dart-review.googlesource.com/c/92660
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2019-02-11 19:06:28 +00:00
Sam Rawlins
c54bc11770
Split DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE off; fixes #30084 and
...
fixes https://github.com/dart-lang/linter/issues/1349
Bug: https://github.com/dart-lang/sdk/issues/30084
Change-Id: I4954b883c1baf019a62776fec108eac60960b22e
Reviewed-on: https://dart-review.googlesource.com/c/88881
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-01-15 03:25:27 +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
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
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
78fdeb688f
Improve the MUST_BE_IMMUTABLE messaging; Fixes #29394
...
Example Dart file:
```dart
import 'package:meta/meta.dart';
@immutable class Foo {}
class Mutable {
int a;
bool b;
}
class Bar = Mutable with Foo;
class Baz extends Foo {
int a;
bool b;
}
class Quux extends Mutable with Foo {}
@immutable class Mut extends Baz {
int c;
bool d;
}
```
Error messages now look like:
Analyzing a.dart...
hint • This class (or a class which this class inherits from) is marked as @immutable, but one or more of its instance fields are not final: Baz.a, Baz.b at a.dart:12:7 • must_be_immutable
hint • This class (or a class which this class inherits from) is marked as @immutable, but one or more of its instance fields are not final: Mutable.a, Mutable.b at a.dart:17:7 • must_be_immutable
hint • This class (or a class which this class inherits from) is marked as @immutable, but one or more of its instance fields are not final: Mut.c, Mut.d, Baz.a, Baz.b at a.dart:19:18 • must_be_immutable
3 hints found.
Bug: https://github.com/dart-lang/sdk/issues/29394
Change-Id: Ib7aba7a4eb3f0ad35e459990558ad1866d5dd7d8
Reviewed-on: https://dart-review.googlesource.com/c/87860
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-01-03 00:29:20 +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
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
Dan Rubel
4264f3c619
Remove unused fasta error code mapping
...
Change-Id: I349513235e43260496bd90a4e6074e673d3ba096
Reviewed-on: https://dart-review.googlesource.com/c/85782
Commit-Queue: Dan Rubel <danrubel@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-12-05 14:35:36 +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
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
Brian Wilkerson
cb88347087
Port the SDK violation hint to the master branch
...
Change-Id: Id795400473796f05e46c0ffdd0a8920f8ad5bcd3
Reviewed-on: https://dart-review.googlesource.com/c/84688
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-11-19 21:14:48 +00:00
Brian Wilkerson
716c9dcde2
Add a hint when Future is imported from core in code targeted to run with an SDK prior to 2.1
...
Change-Id: I925412b9c7c3023836a0a2a7d3d00847adf0b0c7
Reviewed-on: https://dart-review.googlesource.com/c/84547
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2018-11-16 19:07:27 +00:00
Paul Berry
5665636983
Merge commit '7fd78ed5b606e64d30ec201de9adce6fdf8856ba' into analyzer
2018-10-22 13:07:24 -07:00