Commit Graph

210 Commits

Author SHA1 Message Date
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
Mike Fairhurst a8831e7481 Handle _FROM_DEFERRED_LIBRARY codes for ui as code
Change-Id: Ie75eea20cd692331c25e2bb20bc11db30fbd749a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96851
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-03-22 18:53:49 +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
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
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
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 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
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 0a337bb36f Report CONST_SPREAD_EXPECTED_LIST_OR_SET and CONST_SPREAD_EXPECTED_MAP.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I70eb31a19c447d17b4cc60ae2ff3caadb35cc6bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96712
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-03-13 06:40:05 +00:00
Brian Wilkerson 16e40cef2f Generate a diagnostic when a set or map literal is ambiguous
Change-Id: Ia105468cf921ee2548ed48e286297e10f921a986
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96541
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-03-12 17:50:40 +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
Mike Fairhurst 15515d86e3 Reland "[analyzer] Constant verifier support for SetOrMapLiteral"
Original change's description:
> Revert "[analyzer] Constant verifier support for SetOrMapLiteral"
> 
> This reverts commit 9c6315c199.
> 
> Reason for revert: Do not have permission to approve the bot failures.
> 
> Original change's description:
> > [analyzer] Constant verifier support for SetOrMapLiteral
> > 
> > Change-Id: Iaa189aa7ad733af3f702546f1d7a379630b61aa7
> > Reviewed-on: https://dart-review.googlesource.com/c/94581
> > Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> > Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
> 
> TBR=paulberry@google.com,brianwilkerson@google.com,mfairhurst@google.com
> 
> Change-Id: Id7f48506994cc5b8de506f9830f12d794f186e21
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://dart-review.googlesource.com/c/94981
> Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
> Commit-Queue: Mike Fairhurst <mfairhurst@google.com>

TBR=paulberry@google.com,brianwilkerson@google.com,mfairhurst@google.com

Change-Id: I7e514b646c1c62532e6f19201db6ea3428cb96d2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/95000
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-03-01 08:01:24 +00:00
Mike Fairhurst 9bec44d1e2 Revert "[analyzer] Constant verifier support for SetOrMapLiteral"
This reverts commit 9c6315c199.

Reason for revert: Do not have permission to approve the bot failures.

Original change's description:
> [analyzer] Constant verifier support for SetOrMapLiteral
> 
> Change-Id: Iaa189aa7ad733af3f702546f1d7a379630b61aa7
> Reviewed-on: https://dart-review.googlesource.com/c/94581
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Auto-Submit: Mike Fairhurst <mfairhurst@google.com>

TBR=paulberry@google.com,brianwilkerson@google.com,mfairhurst@google.com

Change-Id: Id7f48506994cc5b8de506f9830f12d794f186e21
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/94981
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-03-01 07:43:04 +00:00
Mike Fairhurst 9c6315c199 [analyzer] Constant verifier support for SetOrMapLiteral
Change-Id: Iaa189aa7ad733af3f702546f1d7a379630b61aa7
Reviewed-on: https://dart-review.googlesource.com/c/94581
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
2019-03-01 06:36:17 +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
Brian Wilkerson 46aa511b49 Improve the message when using a prefix to reference an undefined name (issue 35936)
Change-Id: Iae25bdffc992e0a50687ab54c56118cd13dfa26f
Reviewed-on: https://dart-review.googlesource.com/c/93121
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-02-13 23:37:37 +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
Mike Fairhurst a5f102a7d1 Analyzer: first pass at reporting unchecked nullable value usage.
Change-Id: I095c7feff821535a17c7cbb0c4bdb9bb04253f16
Reviewed-on: https://dart-review.googlesource.com/c/88752
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-01-16 18:38:34 +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
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
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
Brian Wilkerson 53447f5d63 Fix an exception in ErrorReporter that caused server to crash
Change-Id: I3ff1d8923e32e4f8d210fd7ada5052dcd108869d
Reviewed-on: https://dart-review.googlesource.com/c/88226
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-01-02 22:06:17 +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
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
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
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 67472e59fb Remove an unused error code and the fix associated with it
Change-Id: I5118cea64a9c687e7ebd102a09cbfbaf467d1e96
Reviewed-on: https://dart-review.googlesource.com/c/85320
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-11-25 19:11:46 +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
Brian Wilkerson 1d00a8a11f Add checking for errors related to set literals
Change-Id: Iad1442da6be318a709f5782fbda4a9055f55dfac
Reviewed-on: https://dart-review.googlesource.com/c/84302
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-11-13 20:08:23 +00:00
Brian Wilkerson f6128b48b6 Add constant evaluation for operators that now apply to bool as well as int
Change-Id: I080386cddfece2d789fcee7d13bdda01260cc724
Reviewed-on: https://dart-review.googlesource.com/c/84160
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-11-12 21:26:08 +00:00
Konstantin Shcheglov c9ae39a9bf Issue 34741. Update error message to make it less unclear.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/34741
Change-Id: If766d0aad5d87578a578849f269746a64430a68b
Reviewed-on: https://dart-review.googlesource.com/c/84100
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-11-12 19:00:34 +00:00
Brian Wilkerson 268993acb2 Provide support for is and as expressions
Change-Id: I853fee6a868314392d37f51f8dd36e2dda319c38
Reviewed-on: https://dart-review.googlesource.com/c/84050
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-11-12 17:10:20 +00:00
Brian Wilkerson 3a427f3294 Add an object representation for literal constant sets
Change-Id: If9ebebac0ba6891c7c5bd2398898f20a7ea82c6b
Reviewed-on: https://dart-review.googlesource.com/c/83940
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-11-09 17:29:31 +00:00
Paul Berry 5665636983 Merge commit '7fd78ed5b606e64d30ec201de9adce6fdf8856ba' into analyzer 2018-10-22 13:07:24 -07:00