Skip to content

Conversation

@mraleph
Copy link
Member

@mraleph mraleph commented Feb 7, 2018

No description provided.

mraleph and others added 4 commits February 7, 2018 13:34
This test formats it to string and expects exact match.

Before this change onClick had type () => dynamic in Dart 1 and () => Null in
Dart 2.
…t.dart

Pass explicit type argument to renderObjectList(...) in expressions like

     List<RenderBox> l = tester.renderObjectList(...).toList();

Dart 2 mode inference is not strong enough to infer RenderBox as a type argument
fto renderObjectList and passes RenderObject instead, which later leads to
runtime check failures (because List<RenderObject> is not List<RenderBox>).
…art.

Pass type argument explicity to widgetList. Dart 2 type inference can't infer
it by itself.
…t.dart

Pass correct type argument to GlobalKey.
@mraleph mraleph requested a review from Hixie February 7, 2018 16:44
pushNamed returns Future<Object> not Future<String>.
@mraleph mraleph requested a review from cbracken February 7, 2018 21:00
@mraleph
Copy link
Member Author

mraleph commented Feb 7, 2018

/cc @cbracken

@cbracken
Copy link
Member

cbracken commented Feb 8, 2018

lgtm

@mraleph mraleph merged commit 0556e14 into flutter:master Feb 8, 2018
@mraleph mraleph deleted the strong-mode-fixes-in-tests branch February 8, 2018 08:31
srawlins added a commit to srawlins/flutter that referenced this pull request Feb 9, 2018
* master: (88 commits)
  Upgrade dartdoc to 0.16.0. (flutter#14602)
  Reduce noise in xcodebuild stdout (flutter#14586)
  Add annotations to ignore analyzer errors on pre-dev.22 SDKs (flutter#14599)
  Roll engine to 337764e (flutter#14597)
  Roll engine with rolled dart (flutter#14538)
  Upgrade packages (flutter#14588)
  Change GlobalObjectKey.toString to strip away State<StatefulWidget>. (flutter#14558)
  Disable selection of the Android ARM64 target platform based on the attached device (flutter#14581)
  Add a flutter run option that can override the default target platform (flutter#14537)
  Fix message channel usage in few tests. (flutter#14557)
  Update documentation on how to test flutter_tools (flutter#14567)
  Fix text_style_text.dart to be Dart 2 compliant. (flutter#14559)
  Hide the NDK warning that should never happen with a regexp (flutter#14503)
  Fix iOS build which broke after the change to fuse --strong option into --preview-dart-2.
  Mark run_machine_concurrent_hot_reload as flaky (flutter#14563)
  Fuse --strong into --preview-dart-2 option.
  Partially fix Dart 2 issues in animated_icons.test. (flutter#14531)
  Strong mode fixes in tests (flutter#14520)
  Fix typo.
  Fix issues.
  ...
DaveShuckerow pushed a commit to DaveShuckerow/flutter that referenced this pull request May 14, 2018
* Use explicit types for onClick handler in diagnostics_test.

This test formats it to string and expects exact match.

Before this change onClick had type () => dynamic in Dart 1 and () => Null in
Dart 2.

* Fix strong mode issues in packages/flutter/test/material/dropdown_test.dart

Pass explicit type argument to renderObjectList(...) in expressions like

     List<RenderBox> l = tester.renderObjectList(...).toList();

Dart 2 mode inference is not strong enough to infer RenderBox as a type argument
fto renderObjectList and passes RenderObject instead, which later leads to
runtime check failures (because List<RenderObject> is not List<RenderBox>).

* Fix strong mode issues in packages/flutter/test/material/theme_test.dart.

Pass type argument explicity to widgetList. Dart 2 type inference can't infer
it by itself.

* Fix strong mode issue packages/flutter/test/widgets/unique_widget_test.dart

Pass correct type argument to GlobalKey.

* Fix type annotation in packages/flutter/test/material/app_test.dart.

pushNamed returns Future<Object> not Future<String>.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 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