Fixes for test failures in Dart 2 mode (#18122)

This commit is contained in:
Keerti Parthasarathy
2018-06-05 12:38:30 -07:00
committed by GitHub
parent 12eeb94c89
commit da7670c2ee
13 changed files with 60 additions and 42 deletions

View File

@@ -237,7 +237,7 @@ class AndroidWorkflow extends DoctorValidator implements Workflow {
);
process.stdin.addStream(stdin);
await waitGroup<Null>(<Future<Null>>[
await waitGroup<void>(<Future<void>>[
stdout.addStream(process.stdout),
stderr.addStream(process.stderr),
]);

View File

@@ -120,8 +120,8 @@ class Fingerprint {
final String version = content['version'];
if (version != FlutterVersion.instance.frameworkRevision)
throw new ArgumentError('Incompatible fingerprint version: $version');
_checksums = content['files'] ?? <String, String>{};
_properties = content['properties'] ?? <String, String>{};
_checksums = content['files']?.cast<String,String>() ?? <String, String>{};
_properties = content['properties']?.cast<String,String>() ?? <String, String>{};
}
Map<String, String> _checksums;

View File

@@ -441,7 +441,8 @@ class DevFS {
_entries.forEach((Uri deviceUri, DevFSContent content) {
if (!content._exists) {
final Future<Map<String, dynamic>> operation =
_operations.deleteFile(fsName, deviceUri);
_operations.deleteFile(fsName, deviceUri)
.then((dynamic v) => v?.cast<String,dynamic>());
if (operation != null)
_pendingOperations.add(operation);
toRemove.add(deviceUri);
@@ -533,7 +534,8 @@ class DevFS {
// Make service protocol requests for each.
dirtyEntries.forEach((Uri deviceUri, DevFSContent content) {
final Future<Map<String, dynamic>> operation =
_operations.writeFile(fsName, deviceUri, content);
_operations.writeFile(fsName, deviceUri, content)
.then((dynamic v) => v?.cast<String, dynamic>());
if (operation != null)
_pendingOperations.add(operation);
});