We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 434ce44 commit 51ec4e9Copy full SHA for 51ec4e9
pkgs/test_core/lib/src/runner/coverage.dart
@@ -31,7 +31,10 @@ Future<Coverage> writeCoverage(
31
await out.close();
32
}
33
return switch (coverage['coverage']) {
34
- List<dynamic> hitMapJson? => HitMap.parseJson(
+ // Matching on `List<dynamic>` the runtime type of `List` in JSON is
35
+ // never `Map<String, dynamic>`. The `cast` below ensures the runtime type
36
+ // is correct for `HitMap.parseJson`.
37
+ List<dynamic> hitMapJson => HitMap.parseJson(
38
hitMapJson.cast<Map<String, dynamic>>(),
39
),
40
null => const {},
0 commit comments