Commit Graph

6070 Commits

Author SHA1 Message Date
Max Bittker 2c09a4cf33 update error message
fixes a small typo in the `INVOCATION_OF_NON_FUNCTION_EXPRESSION` message

Closes #35589
https://github.com/dart-lang/sdk/pull/35589

GitOrigin-RevId: b30d58449c7d2d7a786d71f64ce1a4251de72296
Change-Id: I623ebd0f5113e4bc8b1e07bfd963c27a28c7fef0
Reviewed-on: https://dart-review.googlesource.com/c/88603
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-01-07 23:38:43 +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 f715a2e79e Include experiments into AnalysisOptions.unlinkedSignature.
Enabled experiments might affect how we parse Dart code, e.g. `?` for
nullable types. So, we need to include at least some experiments into
unlinkedSignature. So, we pessimistically include all of them.

R=brianwilkerson@google.com, paulberry@google.com

Change-Id: Ib6e95fe7f4efaa6e6ada1c3a81d010c89f9676d5
Reviewed-on: https://dart-review.googlesource.com/c/88602
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-01-07 22:16:03 +00:00
Konstantin Shcheglov eebafbc4a8 Issue 35090. Add noSuchMethod forwarders to implemented members.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/35090
Change-Id: I1a72d70effe49111921a0db2a2e5396197d3a51b
Reviewed-on: https://dart-review.googlesource.com/c/88542
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-01-07 19:40:19 +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 4e0762c636 Fix constant evaluation for the new bool operators
Change-Id: I4a30544b2d0e5cff8287dbe5fc83387b4e92a875
Reviewed-on: https://dart-review.googlesource.com/c/88437
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-01-05 22:57:19 +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
Konstantin Shcheglov 614f6241bb Initial version of DefiniteAssignmentTracker.
I think it supports all expressions and statements.

Change-Id: I753bd6ce781f54c1dfd0f15f69fca2f15c2a1877
Reviewed-on: https://dart-review.googlesource.com/c/87423
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-01-04 23:54:23 +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
Paul Berry 01a8ff067e Remove support for "@checked" annotations.
Dart now has a "covariant" keyword that serves the same purpose.

Fixes #28797

Note that this is a breaking change, not to the analyzer API but to
the language semantics implemented by the analyzer; client code that
wants the "@checked" behavior will now have to use the "covariant"
keyword instead.  Since the front end implementation of the type
system only supports the "covariant" keyword, the impact on user code
should be low; any user code that would be broken by this change is
already broken under the front end.  Google internal code has already
been migrated to use "covariant".

Change-Id: Ida052bd5449d3ba703bacf98143bece650f53b53
Reviewed-on: https://dart-review.googlesource.com/c/88225
Commit-Queue: Paul Berry <paulberry@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-01-03 22:12:43 +00:00
pq af2e4d5855 add exception details to linter logging info
Change-Id: Idf2f8c35def6a94e0e5febac53e1109e1983d061
Reviewed-on: https://dart-review.googlesource.com/c/88287
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-01-03 20:34:42 +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
Konstantin Shcheglov d200089583 Make MethodInvocationImpl.methodNameType a synonym of staticInvokeType if the target element is not a getter.
So, that type inference that updates staticInvokeType later, in
StaticTypeAnalyzer._inferGenericInvocationExpression() also implicitly
updates methodNameType. This fixes the new set of exceptions that we
saw right before holidays. I'm running them now, most are green,
no reds yet.

R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I53030a1a62a2a669549a47680c6c0c98b4031383
Reviewed-on: https://dart-review.googlesource.com/c/88227
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-01-03 16:57:22 +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
Paul Berry fd92515e14 Make ExprBuilder.uc private.
In future CLs, we'll switch from using the UnlinkedConst RPN
representation to the string representation.  Making ExprBuilder.uc
private will help isolate the necessary changes to just one class.

Change-Id: I44c32c48d6275e3b4fd900a45a396876ed388ee2
Reviewed-on: https://dart-review.googlesource.com/c/88284
Auto-Submit: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-01-03 15:25:50 +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
Paul Berry fa296dc3fa Add a string representation of initializer expressions to summaries.
This is preparatory work for #35418.  The string representation is
produced, and tested via unit tests, but not yet used.  In follow-up
CLs we will begin modifying the analyzer to make use of the string
representation, guarded by a flag at first to avoid incompatibilities
with older summary files.  When it is safe to do so we'll hardcode the
flag and remove the old RPN representation.

Change-Id: Iab92ff742930f39761a9df6630f199359d76fcf6
Reviewed-on: https://dart-review.googlesource.com/c/88231
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-01-03 13:26:06 +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 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
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
Mike Fairhurst d99fb0618f Remove unused imports
Change-Id: I581cb2078a4df7c8e7d00eb881b3a93bfa3f5eaf
Reviewed-on: https://dart-review.googlesource.com/c/88224
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
2019-01-02 21:32:35 +00:00
Sam Rawlins 0797d6ef69 Remove unused variables in analyzer workspace/
Change-Id: Ifbf09cb2262adb836ce3451bfd1a5033cfca19c7
Reviewed-on: https://dart-review.googlesource.com/c/88163
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-01-02 19:09:33 +00:00
Sam Rawlins 983795d26a Add Annotation support to LinterVisitor and NodeLintRegistry
Bug: https://github.com/dart-lang/linter/issues/1073
Change-Id: I891e4b6322a13781220efc52c23ee9ca3c557418
Reviewed-on: https://dart-review.googlesource.com/c/88162
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-01-02 19:07:33 +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 8c6f495f9b Stop creating contexts for excluded directories
Change-Id: Ifd0e053a1a7fb4fff9c3dcb9fdaeb68f54f7eeae
Reviewed-on: https://dart-review.googlesource.com/c/88160
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-12-31 16:23:08 +00:00
Brian Wilkerson c10da25d48 Mark the toString method from enum declarations as being synthetic
Change-Id: If8f3e0692ac5ff79fb61be613d59d6dae726bf0d
Reviewed-on: https://dart-review.googlesource.com/c/88041
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-12-23 18:03:11 +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 f69aabdb62 Move the check for INVALID_SEALED to the BestPracticesVerifier
Change-Id: I974196f7cd1c2b7c24df1d759774faed9f8a2581
Reviewed-on: https://dart-review.googlesource.com/c/87705
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-12-19 23:40:06 +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 8905876e82 Create a double value from an int literal when it was promoted
Change-Id: I17b076e1b4e4d11ac35cc2e5d6750ec5c5fab548
Reviewed-on: https://dart-review.googlesource.com/c/87607
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2018-12-18 22:39:11 +00:00
Konstantin Shcheglov b4a7255684 Issue 35438. When no linked library, fill also _resynthesizedUnits when creating a synthetic library.
There are no linked library because LibraryContext does not add it
if FileState.exists is false. I'm not quite satisfied that we do this,
because everywhere else we pretend that any file exists, but possibly
with empty content.  However we use absence of the linked library
as a signal that `LibraryElement.isSynthetic` should be set. So, we
would need to signal not existing library to resynthesizer in some
other way, or make changes in places where we use `isSynthetic` to
decide whether to report errors.

R=brianwilkerson@google.com, paulberry@google.com

Bug: https://github.com/dart-lang/sdk/issues/35438
Change-Id: I39ad7d173b85a2e0bc7333bb7bee9fad709e0dea
Reviewed-on: https://dart-review.googlesource.com/c/87603
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-12-18 20:43:52 +00:00
Brian Wilkerson b2d6a2327c Convert two uses of the old type algebra API to the new
Change-Id: I93b91622915aa96b0f1791096b76ca084725428d
Reviewed-on: https://dart-review.googlesource.com/c/87600
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-12-18 18:51:00 +00:00
Brian Wilkerson f94aa6e329 Make the internal TypeSystem implement the public TypeSystem
Change-Id: I38731f0bc560134c7ad0b0a339ea4e0528e5f6ab
Reviewed-on: https://dart-review.googlesource.com/c/87602
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-12-18 18:20:28 +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
Konstantin Shcheglov a9c1c056a7 Use the first two key characters for sharding in FileByteStore.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/28383
Change-Id: I177e9bedef79627d7b21e565684004054cef1e54
Reviewed-on: https://dart-review.googlesource.com/c/87521
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-12-18 15:40:55 +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
Mike Fairhurst 457222053a Remove two unused imports
Change-Id: I6fc676fd7c70076048d07d1d6e0f53ef6e0bb0f9
Reviewed-on: https://dart-review.googlesource.com/c/87481
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2018-12-17 20:58:54 +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 fd4ae6eda6 Augment AST/element type matchers to include (almost) all types.
R=brianwilkerson@google.com

Change-Id: I6650ed6fd40ca794b04bacb643bef2c3a578ba43
Reviewed-on: https://dart-review.googlesource.com/c/87270
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-12-14 19:04:34 +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
Paul Berry 28c78b9d46 Add an assertion to check consistency of ExperimentalFeature constants.
This uncovered a bug in dev_compiler that was showing up at compile
time--it was defaulting the enableAsserts flag to null, causing a null
pointer exception during kernel constant evaluation.

Change-Id: I2c75ffdc494f8d768aa98d67ef8257a20e74b9cd
Reviewed-on: https://dart-review.googlesource.com/c/86982
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-12-13 21:53:34 +00:00
Brian Wilkerson bf528959af Proposed public API for the type system
Change-Id: I1980ffe05f246430e9dcb637eb3ac984ae1f4b1e
Reviewed-on: https://dart-review.googlesource.com/c/87240
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-12-13 20:42:17 +00:00