Skip to content

Fix a couple of strong mode issues.#14070

Merged
mraleph merged 1 commit intoflutter:masterfrom
mraleph:fix-strong-mode
Jan 13, 2018
Merged

Fix a couple of strong mode issues.#14070
mraleph merged 1 commit intoflutter:masterfrom
mraleph:fix-strong-mode

Conversation

@mraleph
Copy link
Copy Markdown
Member

@mraleph mraleph commented Jan 12, 2018

* JSON.decode produces Map<String, dynamic> and List<dynamic>
objects. If a more tight type is required then object needs to
be converted explicitly (see dart-lang/sdk#31876);
* Completer<dynamic> produces Future<dynamic>. In Dart 2 it is
runtime error to assign Future<dynamic> to variable of type Future<T>;
@mraleph mraleph requested a review from Hixie January 12, 2018 17:32
// completer for it to use when it does run.
completer = new Completer<dynamic>();
completer = new Completer<T>();
_structuredDataCache[key] = completer.future;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't use T here because the compiler doesn't reify it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh I guess when it doesn't it just treats it as dynamic though? So it'll do the same thing? Ok.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. Even though in Dart 1 mode VM pipeline does not reify T it still parses the whole thing correctly and substitutes dynamic here.

@Hixie
Copy link
Copy Markdown
Contributor

Hixie commented Jan 12, 2018

LGTM

@mraleph mraleph merged commit 6e38b42 into flutter:master Jan 13, 2018
@mraleph mraleph deleted the fix-strong-mode branch January 13, 2018 08:18
DaveShuckerow pushed a commit to DaveShuckerow/flutter that referenced this pull request May 14, 2018
* JSON.decode produces Map<String, dynamic> and List<dynamic>
objects. If a more tight type is required then object needs to
be converted explicitly (see dart-lang/sdk#31876);
* Completer<dynamic> produces Future<dynamic>. In Dart 2 it is
runtime error to assign Future<dynamic> to variable of type Future<T>;
engine-flutter-autoroll added a commit that referenced this pull request Dec 3, 2019
) (#46002)

git@github.com:flutter/engine.git/compare/faa11214c09b...1a96087

git log faa1121..1a96087 --first-parent --oneline
2019-12-03 brianosman@google.com Update to newer path fill-type API in Skia (#14070)


If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC chinmaygarde@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants