test: Fix inference error in loader_http_test
Fixes https://github.com/dart-lang/resource/issues/31
diff --git a/test/loader_http_test.dart b/test/loader_http_test.dart
index 868f51d..856971d 100644
--- a/test/loader_http_test.dart
+++ b/test/loader_http_test.dart
@@ -38,7 +38,10 @@
request.response
..write(content)
..close();
- }).catchError(print);
+ }).catchError((e, stack) {
+ print(e);
+ print(stack);
+ });
});
test("Default encoding", () async {
@@ -120,7 +123,7 @@
}
Encoding parseAcceptCharset(List<String> headers) {
- var encoding = latin1;
+ Encoding encoding = latin1;
if (headers != null) {
var weight = 0.0;
var pattern = new RegExp(r"([\w-]+)(;\s*q=[\d.]+)?");