Unverified Commit 741e9675 authored by Konstantin Scheglov's avatar Konstantin Scheglov Committed by GitHub

Remote returns for function expression inferred return type void. (#61582)

parent 1840b712
......@@ -26,7 +26,6 @@ void main() {
ServicesBinding.instance.defaultBinaryMessenger.handlePlatformMessage(
channel, _makeByteData('bar'), (ByteData message) async {
count += 1;
return null;
});
expect(count, equals(0));
await ui.channelBuffers.drain(channel,
......
......@@ -271,7 +271,7 @@ class _DevFSHttpWriter {
);
await request.addStream(contents);
final HttpClientResponse response = await request.close();
response.listen((_) => null,
response.listen((_) {},
onError: (dynamic error) {
_logger.printTrace('error: $error');
},
......
......@@ -85,7 +85,7 @@ void main() {
when(portForwarder.forwardedPorts)
.thenReturn(<ForwardedPort>[ForwardedPort(hostPort, devicePort)]);
when(portForwarder.unforward(any))
.thenAnswer((_) async => null);
.thenAnswer((_) async {});
final HttpClientRequest httpClientRequest = MockHttpClientRequest();
httpClient = MockHttpClient();
......@@ -296,7 +296,7 @@ void main() {
when(portForwarder.forwardedPorts)
.thenReturn(<ForwardedPort>[ForwardedPort(hostPort, devicePort)]);
when(portForwarder.unforward(any))
.thenAnswer((_) async => null);
.thenAnswer((_) async {});
when(mockHotRunner.attach(appStartedCompleter: anyNamed('appStartedCompleter')))
.thenAnswer((_) async => 0);
when(mockHotRunnerFactory.build(
......@@ -370,7 +370,7 @@ void main() {
when(portForwarder.forwardedPorts)
.thenReturn(<ForwardedPort>[ForwardedPort(hostPort, devicePort)]);
when(portForwarder.unforward(any))
.thenAnswer((_) async => null);
.thenAnswer((_) async {});
when(mockHotRunner.attach(appStartedCompleter: anyNamed('appStartedCompleter')))
.thenAnswer((_) async => 0);
when(mockHotRunnerFactory.build(
......@@ -424,7 +424,7 @@ void main() {
when(portForwarder.forwardedPorts)
.thenReturn(<ForwardedPort>[ForwardedPort(hostPort, devicePort)]);
when(portForwarder.unforward(any))
.thenAnswer((_) async => null);
.thenAnswer((_) async {});
});
testUsingContext('succeeds in ipv4 mode', () async {
......
......@@ -202,7 +202,6 @@ void main() {
expect(environment, <String, String>{
'VM_SERVICE_URL': 'null',
});
return null;
});
appStopper = expectAsync1((DriveCommand command) async {
return true;
......
......@@ -295,7 +295,7 @@ void main() {
when(os.unzip(any, any)).thenAnswer((Invocation invocation) {
final File zipFile = invocation.positionalArguments[0] as File;
if (zipFile.path != 'app.ipa') {
return null;
return;
}
final Directory targetDirectory = invocation.positionalArguments[1] as Directory;
final String bundlePath1 =
......@@ -316,7 +316,7 @@ void main() {
when(os.unzip(any, any)).thenAnswer((Invocation invocation) {
final File zipFile = invocation.positionalArguments[0] as File;
if (zipFile.path != 'app.ipa') {
return null;
return;
}
final Directory targetDirectory = invocation.positionalArguments[1] as Directory;
final Directory bundleAppDir = globals.fs.directory(
......
......@@ -655,7 +655,7 @@ void fakeData(
if (expectSetStamp) {
stamp = VersionCheckStamp.fromJson(castStringKeyedMap(json.decode(invocation.positionalArguments[1] as String)));
return null;
return;
}
throw StateError('Unexpected call to Cache.setStampFor(${invocation.positionalArguments}, ${invocation.namedArguments})');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment