Make status file linter valid Dart 2 code

Change-Id: I14e1ca4a32022cbd9b112a02d15ad35e92824854
Reviewed-on: https://dart-review.googlesource.com/61882
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: William Hesse <whesse@google.com>
diff --git a/pkg/status_file/lib/status_file_linter.dart b/pkg/status_file/lib/status_file_linter.dart
index 43b407b..fa98680 100644
--- a/pkg/status_file/lib/status_file_linter.dart
+++ b/pkg/status_file/lib/status_file_linter.dart
@@ -132,8 +132,11 @@
 /// Checks for duplicate section entries in the body of a section.
 Iterable<LintingError> lintSectionEntryDuplicates(StatusSection section) {
   var errors = <LintingError>[];
-  List<StatusEntry> statusEntries =
-      section.entries.where((entry) => entry is StatusEntry).toList();
+  // TODO(whereType): When whereType is supported, use that.
+  List<StatusEntry> statusEntries = section.entries
+      .where((entry) => entry is StatusEntry)
+      .cast<StatusEntry>()
+      .toList();
   for (var i = 0; i < statusEntries.length; i++) {
     var entry = statusEntries[i];
     for (var j = i + 1; j < statusEntries.length; j++) {