Fix the remaining strong mode warnings.

These ones require explicit casts to work around limitations in some
SDK methods and expectAsync() in test. Ideally, we will change those
APIs to be more soundly typed. Until then, this gets the package clean.

R=nweiz@google.com

Review URL: https://codereview.chromium.org//1871763002 .
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 75a311f..174754c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 1.6.5
+
+* Really fix strong mode warnings.
+
 ## 1.6.4
 
 * Fix a syntax error introduced in 1.6.3.
diff --git a/lib/src/chain.dart b/lib/src/chain.dart
index 6de670f..a27e8a6 100644
--- a/lib/src/chain.dart
+++ b/lib/src/chain.dart
@@ -78,7 +78,8 @@
         };
       }
 
-      return runZoned(callback, onError: newOnError);
+      // TODO(rnystrom): Remove this cast if runZoned() gets a generic type.
+      return runZoned(callback, onError: newOnError) as dynamic/*=T*/;
     }
 
     var spec = new StackZoneSpecification(onError);
@@ -91,7 +92,8 @@
       }
     }, zoneSpecification: spec.toSpec(), zoneValues: {
       #stack_trace.stack_zone.spec: spec
-    });
+    }) as dynamic/*=T*/;
+    // TODO(rnystrom): Remove this cast if runZoned() gets a generic type.
   }
 
   /// Returns [futureOrStream] unmodified.
diff --git a/pubspec.yaml b/pubspec.yaml
index 654d13d..e49783e 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -7,7 +7,7 @@
 #
 # When the major version is upgraded, you *must* update that version constraint
 # in pub to stay in sync with this.
-version: 1.6.4
+version: 1.6.5
 author: "Dart Team <misc@dartlang.org>"
 homepage: http://github.com/dart-lang/stack_trace
 description: >
diff --git a/test/chain/chain_test.dart b/test/chain/chain_test.dart
index 40b06d5..0824f4f 100644
--- a/test/chain/chain_test.dart
+++ b/test/chain/chain_test.dart
@@ -10,6 +10,8 @@
 
 import 'utils.dart';
 
+typedef void ChainErrorCallback(stack, Chain chain);
+
 void main() {
   group('Chain.parse()', () {
     test('parses a real Chain', () {
@@ -48,7 +50,8 @@
       }, onError: expectAsync((error, chain) {
         expect(error, equals("oh no"));
         expect(chain, new isInstanceOf<Chain>());
-      }), when: false);
+      }) as ChainErrorCallback, when: false);
+      // TODO(rnystrom): Remove this cast if expectAsync() gets a better type.
     });
   });
 
diff --git a/test/chain/utils.dart b/test/chain/utils.dart
index 366502c..f345fc0 100644
--- a/test/chain/utils.dart
+++ b/test/chain/utils.dart
@@ -73,8 +73,11 @@
     new Future.value().then((_) => callback())
         .catchError(completer.completeError);
   });
+
+  // TODO(rnystrom): Remove this cast if catchError() gets a better type.
   return completer.future
-      .catchError((_, stackTrace) => new Chain.forTrace(stackTrace));
+          .catchError((_, stackTrace) => new Chain.forTrace(stackTrace))
+      as Future<Chain>;
 }
 
 /// Runs [callback] in a [Chain.capture] zone and returns a Future that