Commit Graph

1123 Commits

Author SHA1 Message Date
Paul Berry ccca7a009c Migration: move finalize method into EditPlanner.
In upcoming CLs, I'm going to need access to the EditPlanner when
finalizing edit plans, and I'd rather do so by making finalize a
method on EditPlanner.  Doing so now to make future code reviews
simpler.

Change-Id: I6182e2224b548b2919f0c8f454f558b72c17e5d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130926
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-01-10 19:45:21 +00:00
Sam Rawlins 0091273e36 Migrator: edge between extension 'on' type and invocation targets; #40023
Change-Id: Ia2f30acec0da2449567d93f99b4c0b0a583c07ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130960
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-01-10 02:01:17 +00:00
Paul Berry 2199e94d37 Migration: begin integrating FixBuilder.
Since the FixBuilder-based implementation is not yet fully baked, we
only enable the integration in api_test.dart for now.  The remaining
failing test cases are marked with a `@FailingTest` annotation
pointing to https://github.com/dart-lang/sdk/issues/38472, which is
the tracking bug for the FixBuilder implementation.

Change-Id: I761350fff125cec8067a96fdfc593b381e5feb3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130882
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-01-09 20:01:16 +00:00
Paul Berry 6ec16da54d Sort declarations in trial_migration.dart
Change-Id: I7f8c3db9bc414c6567547e163fd417bc602e4d4a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130880
Reviewed-by: Janice Collins <jcollins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-01-09 16:04:26 +00:00
Paul Berry cab2998a27 EditPlanner: add the ability to comment out code rather than removing it.
Change-Id: I6ba621d6482321104f6741772fef46753c599179
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129803
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-01-09 15:59:36 +00:00
Sam Rawlins 894d318b33 Migrator: initial support for extensions; #40023
Change-Id: I90829077e63f3c3ae2a31e3ead0da947e4275823
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130729
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-01-09 15:43:16 +00:00
Paul Berry 73561e5a29 Create a factory interface for creating EditPlans: EditPlanner.
This factory class serves three purposes:

- In a future CL, it will contain fields to customize the global
  behavior of the edit plans that are created (e.g. whether code
  should be removed or commented out).

- In a future CL, it will contain a pointer to the original (text)
  contents of the source file.  This will allow edit plans to make
  more sophisticated changes such as adjusting indentation.

- In a future CL, it will contain methods for creating common kinds of
  "extract" edit plans such as null-checking an expression or making a
  type nullable.  (Currently the client must create these edit plans
  using EditPlanner.extract, which has an error-prone API).

Change-Id: I87ac75b73003d0e7b416e3d2121eadb2770da5ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129802
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-01-09 05:22:57 +00:00
Paul Berry c81efbe59a Change NodeChange.apply to accept a FixAggregator rather than a callback.
This will facilitate a follow-up CL that introduces a factory class
for creating EditPlans.

Change-Id: I4fa82371844388f3042107375eb1e7a7e9804647
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129801
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-01-09 05:22:57 +00:00
Paul Berry 6da2ded062 Migration: simplify "extract" edit plans by always deferring change computation.
Change-Id: Ie1b66e2034bd9f111e9f491addef101d0c192974
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129400
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-01-09 05:22:57 +00:00
Paul Berry d4f40220b1 Migration: Teach FixBuilder not to append ? to void type.
Change-Id: I80e932c9a16cb13b8978531bcd5fe28693e01124
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129328
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-01-09 05:22:57 +00:00
Mike Fairhurst 8b777dd829 [nnbd_migration] fix flow analysis for function declarations
We were getting a static error in package:logging for

```dart
Zone recordingZone;
// ...

runZoned(() {
  recordingZone = Zone.current;
  // ...
});

// ...
expect(records.first.zone, equals(recordingZone));
```

That is a static error if we don't make `recordingZone` late or
nullable.

Change-Id: Iab5e47dd8df375c7dc5283ce4570ad1321ba919e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130738
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-01-09 00:09:25 +00:00
Konstantin Shcheglov 1fee7f0263 Remove unnecessary casts to TypeImpl.
Change-Id: I48dcc4a448fa60551905c3d73c8df90a31230738
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130572
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-08 17:22:30 +00:00
Konstantin Shcheglov 9e7c401d4f InterfaceTypeImpl has one constructor.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: Iea88ae0fa035ffa7154460ac61752cf90dc004c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130571
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-01-08 06:16:23 +00:00
Mike Fairhurst 75a93bce5e [nnbd_migration] Fix Enum.toString(), the last exception in flutter.
Turns out the flow analysis bug was actually an issue with calling
toString() on an enum. This happened to throw the same type of exception
as caused by the shared part file, so it blended in. Flow analysis was
not itself broken.

Tested the other methods on enum too, but no others seemed to have this
problem.

Change-Id: I5e9e1be3f02adf0177c276c63d0c4f4fa2cb94db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130622
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-01-08 01:38:19 +00:00
Mike Fairhurst 053fb6ad56 [nnbd_migration] Fix compound downcasts involving Object -> void
Change-Id: I5d26c0e5123bd717f55f3489335d53167c08a889
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130400
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-01-06 21:46:33 +00:00
Mike Fairhurst 1c7f1f16a2 [nnbd_migration] Unwrap legacy member elements into their NNBD declarations
Change-Id: I4a2d445625716a61c00f970f04a95af8aaa918fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128101
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-01-06 21:46:10 +00:00
Mike Fairhurst 033422b8cf [nnbd_migration] preserve type formals in DecoratedType.withNode()
Change-Id: I44ef4374714b02a497ae0981a8de1db9e593b029
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130181
Reviewed-by: Janice Collins <jcollins@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-01-06 18:06:21 +00:00
Konstantin Shcheglov 39f14a000e Rewrite most getDisplayString() to ElementDisplayStringBuilder.
R=brianwilkerson@google.com

Change-Id: I500d0045873a12d550d9ffe302e066a63ba56660
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130221
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-06 16:43:40 +00:00
Mike Fairhurst 6e7a900283 [nnbd_migration] Fix ConditionalModification on IfElement
Change-Id: I1e8ec4bead2aaa9147850d27cd5ac4d9c2a700be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130137
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-01-03 23:47:50 +00:00
Mike Fairhurst 2f453dcf5a [nnbd_migration] handle yoda conditions with null literals
Change-Id: Id848e71e22c2adb2e96a372dde1e1d8fffe87805
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130136
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-01-03 23:39:47 +00:00
Mike Fairhurst 610c1e41a0 [nnbd_migration] handle Object better, to fix void -> Object assignments
Change-Id: Ibd2fa86578e76dc79f402cae2a21b01223af90aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130127
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-01-03 22:02:31 +00:00
Mike Fairhurst 0e0bc8e1a6 [nnbd_migration] Save enum index getter in the node builder
Change-Id: I1714244a18471f0ac489a2bf7a4de2e6b5c0c3cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130102
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-01-03 20:21:49 +00:00
Mike Fairhurst 44e3627f29 [nnbd_migration] Support mixins, specifically super on a mixin.
Change-Id: Ia0d61b8faebfba22933af8d8f902e272b27d4f6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130060
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-01-03 19:21:49 +00:00
Mike Fairhurst 29e89f512d [nnbd_migration] Fix return Bottom from async function.
Change-Id: I4de22568a5540d9796f4668ad3d69dfb2a15109c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129818
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-01-02 21:58:16 +00:00
Mike Fairhurst c89c373e87 [nnbd_migration] handle enum values getter
Change-Id: I268ced7d3a002ff41dc1e75b6a376acb3af88fa0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129541
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-01-02 21:18:11 +00:00
Paul Berry 1317212b22 Migration: teach FixBuilder to add the required keyword when necessary.
Change-Id: Ifb20e60f1ea8578bcdcfe503582902734d56b881
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129326
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2019-12-28 23:50:56 +00:00
Mike Fairhurst 80f4497da7 [nnbd_migration] Handle invokeType on function invocation expression
It also looks like the old clause detecting method invocations on
variables is no longer relevant. Removing it does not fail any tests,
p1g1 packages, or sdk/third_party/pkg/ packages.

Change-Id: Idcab49f00c6b5b38ba5f2ecf3f2a45787c13376a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129817
Commit-Queue: Paul Berry <paulberry@google.com>
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-12-28 23:36:16 +00:00
Mike Fairhurst 1bdd4f69da [nnbd_migration] Visit annotations in field formal parameters
Change-Id: I6bd3bd98cf3571fe101eb4623c11425915da0613
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129809
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-12-27 21:26:35 +00:00
Mike Fairhurst 52d568a9ea [nnbd_migration] fix crash by composing non-null/type promotion
There were cases where types that are promoted with current type
promotion were not being promoted with improved type promotion due to
null-checks:

```dart
void f(x) {
  if (x == null) {
    return;
  }

  if (x is ...) ...
}
```

This was causing a bad state when trying to substitute type parameters
on methods if promotion usually succeeded.

Fix the crash by allowing migration to promote a non-null type to a new
type, and make that new type an intersection of the new type and
non-null.

```dart
  if (x == null) {
  } else if (x is List<int/*1*/>/*2*/) { // promote to List<int/*1*/>!
```

Change-Id: Icf9f74eb2b3eef887a29d4bfab7556ac126f49e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129540
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-12-27 19:53:46 +00:00
Paul Berry f525ddeaf3 Add/fix return types to NNBD migration tests.
This will be necessary in order to pass pedantic lints.  See
discussion in https://dart-review.googlesource.com/c/sdk/+/129325.

Change-Id: I61011a082a5401401fa1b7bb0d0bd7aed87a9d10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129800
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-12-27 18:13:15 +00:00
Paul Berry 0456e99838 Migration: add new test files to test_all.dart
Change-Id: Ibcb7644cfc44d558de022f0579b29c96a35c84cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129327
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-12-27 14:23:15 +00:00
Konstantin Shcheglov 2fb3f09948 Extract TypeProvider class into lib/dart/element/type_provider.dart file
Change-Id: I96cdfccc33e35a9625c14a89a08826758eac0f2c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129601
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-12-26 21:31:04 +00:00
Paul Berry 20711a29ef Fix return types in fix_aggregator_test.dart.
The test methods in this test file were declared to return `void`, but
a more accurate return type is actually `Future<void>`.

Change-Id: I31e3ab7e2ad9cb81b07a9f8c7cec84fad9f99f80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129325
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-12-26 15:35:59 +00:00
Mike Fairhurst 84054e8641 [nnbd_migration] group trial exceptions by pkg, skip bad files
Change-Id: I43aebea6030726077cc8478a948e01e3c2989dc7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129521
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-12-24 00:56:10 +00:00
Mike Fairhurst 0eb4af17a1 [nnbd_migration] fix returning null from async fn
Change-Id: I7f13149b9d486f434f9db174f5ec3e0fcfb79dcd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129501
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-12-23 23:13:10 +00:00
Mike Fairhurst a9e91396a7 [nnbd_migration] Support enums
Change-Id: Ib15b821691168359d0b31b185b5c7deb7da3c7e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129500
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-12-23 23:13:02 +00:00
Mike Fairhurst 2df7aaa659 [nnbd_migration] Fix method calls on newly promoted types.
Consider:

```dart
List<num> x;
if (x is! List<int>) return;
x.toSet();
```

In this case, `x.toSet()` gets a `targetType` of `List<int>` due to new
promotion. However, the element of `toSet` is `Set<num> Function()`.

We provide the correct `targetType` in `getOrComputeElementType`, with
the correct substitution T/int. However, the resulting element has the
incorrect member substitutions T/num.

It is therefore no longer worth providing the `undecoratedResult`
argument, because it is not the correct answer. The only way to get the
correct answer is to undo the member substitutions, and reapply the new
substitutions. This is what `.substitute` already does. This plus other
CLs to always provide the implicit `this` type, together mean that this
code does everything it needs to.

In case this was done for performance, I timed it A:B, and both took

1:13s to perform trial_migration.sh
Change-Id: Iecf7e6893d56ec96af735814e5c9acb13854f67d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129329
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-12-23 18:53:50 +00:00
Paul Berry 7a94decac4 Migration: modify FixBuilder to make use of the NodeChange type from FixAggregator.
This will allow FixBuilder and FixAggregator to be integrated together.
I have a branch in which they are integrated, but it is currently
failing some tests due to missing functionality in FixBuilder, so I'll
work on implementing the missing functionality before completing the
migration.

Change-Id: If3fd64665eef8a8373e5679978e3724eee6689da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129306
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2019-12-22 15:16:16 +00:00
Paul Berry 8ce84595c5 Introduce a FixAggregator.
FixAggregator will form the last stage of the migration engine, taking
the output of FixBuilder (which is a map from AST nodes to individual
changes) and feeding it into the EditPlan infrastructure to produce
the complete set of edits for any given file.

In a follow-up CL, I will modify FixBuilder to make use of the
NodeChange classes defined here.

Change-Id: I73fd67d7e989194049d91f978a7d9134814d3265
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129304
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2019-12-22 15:16:16 +00:00
Paul Berry 4c2f3669b2 Introduce EditPlan, a builder class for creating source edits with automatic parenthesis management.
Initially this will be used in the NNBD migration engine to produce
migration output.  Assuming it proves useful, in a future CL I'd like
to consider moving it to the analyzer_plugin package and using it as a
basic for all of the analysis server's refactorings.

Change-Id: I41ffc578ace3945fcfebb8eb824b6b5706dfba6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129302
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2019-12-20 22:43:54 +00:00
Mike Fairhurst c260e4e8da [nnbd_migration] Handle downcast from Iterable<T> to List<T>
Change-Id: Iee4a0e2c7bbd8fbc0a09e62d7edd5908c923a787
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129262
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-12-20 20:29:54 +00:00
Mike Fairhurst 43f74824c2 [nnbd_migration] Substitute type parameters for implicit super
Change-Id: Icfe46c4cc0950cafef07e8448f82985c04ce20ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129260
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-12-20 18:18:51 +00:00
Mike Fairhurst 4681868aaf [nnbd_migration] Fix TypeParameterType asInstanceOf where valid.
Change-Id: I033b378d0e87ead2bacad27d71a0c696904d8e15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128985
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-12-20 02:05:49 +00:00
Mike Fairhurst 6efbe7f3ce [nnbd_migration] Handle downcasting type arguments.
There are no examples of a downcast involving a nullable type in the
current set of working packages. This tells me that it's rare, and that
this behavior should be good enough.

If we're wrong, this unblocks packages and we can revisit this decision
later.

Change-Id: Ic4e23cc6a848b83b2d1fb6c97ff513c3cc9fdb2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128778
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-12-18 20:02:56 +00:00
Paul Berry e87c625fbe Migration: Re-architect FixBuilder to use the analyzer resolver.
This CL establishes the scaffolding for the new FixBuilder
architecture, and gets most of the previous tests to pass.

Several TODOs remain, which I plan to address in future CLs, however I
want to get the FixBuilder running end-to-end before doing so, so I
will work on that next.

Change-Id: Ic68b04c70b6cb8c72d04f00f9a027c3498f3acbc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128562
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-12-18 19:22:46 +00:00
Janice Collins 93b7f2c41b Do not parallelize pub get.
Change-Id: I89b9848da0d0484d6ab8cc97720edf514ecc7fb0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128620
Commit-Queue: Janice Collins <jcollins@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-12-16 23:54:43 +00:00
Mike Fairhurst a4e3bcbe42 [nnbd_migration] Fix assertion failure in _forTypeParameterSubstitution when not fresh
Change-Id: I1f372f5dd4925e58a4803a20680c052c553c4dc7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128304
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-12-16 22:24:33 +00:00
Mike Fairhurst b3194cab7d [nnbd_migration] handle downcast from Function to a function type
Change-Id: I8a574aed910951dcd35ec1d4e74018dcfc2b24c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128285
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-12-16 18:58:53 +00:00
Mike Fairhurst 1c07a828e8 [nnbd_migration] Handle downcast from dynamic to function types
Change-Id: Ic47165217778f1ff8c9375cdd40e9daecc0099f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128284
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-12-16 18:58:53 +00:00
Janice Collins 4e1a9afc4b Update trial_migration for P1/G1 packages.
The shell script now makes use of github fetching and `pub get` to deal with dev_dependencies
and other things missing from the SDK.  Also added the remaining packages not in the SDK, but
in group 1.

Change-Id: I6ae9b169eb8a419d73c66f08fb3973b49a96efb7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128287
Commit-Queue: Janice Collins <jcollins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-12-16 16:41:02 +00:00