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() { ...@@ -26,7 +26,6 @@ void main() {
ServicesBinding.instance.defaultBinaryMessenger.handlePlatformMessage( ServicesBinding.instance.defaultBinaryMessenger.handlePlatformMessage(
channel, _makeByteData('bar'), (ByteData message) async { channel, _makeByteData('bar'), (ByteData message) async {
count += 1; count += 1;
return null;
}); });
expect(count, equals(0)); expect(count, equals(0));
await ui.channelBuffers.drain(channel, await ui.channelBuffers.drain(channel,
......
...@@ -271,7 +271,7 @@ class _DevFSHttpWriter { ...@@ -271,7 +271,7 @@ class _DevFSHttpWriter {
); );
await request.addStream(contents); await request.addStream(contents);
final HttpClientResponse response = await request.close(); final HttpClientResponse response = await request.close();
response.listen((_) => null, response.listen((_) {},
onError: (dynamic error) { onError: (dynamic error) {
_logger.printTrace('error: $error'); _logger.printTrace('error: $error');
}, },
......
...@@ -85,7 +85,7 @@ void main() { ...@@ -85,7 +85,7 @@ void main() {
when(portForwarder.forwardedPorts) when(portForwarder.forwardedPorts)
.thenReturn(<ForwardedPort>[ForwardedPort(hostPort, devicePort)]); .thenReturn(<ForwardedPort>[ForwardedPort(hostPort, devicePort)]);
when(portForwarder.unforward(any)) when(portForwarder.unforward(any))
.thenAnswer((_) async => null); .thenAnswer((_) async {});
final HttpClientRequest httpClientRequest = MockHttpClientRequest(); final HttpClientRequest httpClientRequest = MockHttpClientRequest();
httpClient = MockHttpClient(); httpClient = MockHttpClient();
...@@ -296,7 +296,7 @@ void main() { ...@@ -296,7 +296,7 @@ void main() {
when(portForwarder.forwardedPorts) when(portForwarder.forwardedPorts)
.thenReturn(<ForwardedPort>[ForwardedPort(hostPort, devicePort)]); .thenReturn(<ForwardedPort>[ForwardedPort(hostPort, devicePort)]);
when(portForwarder.unforward(any)) when(portForwarder.unforward(any))
.thenAnswer((_) async => null); .thenAnswer((_) async {});
when(mockHotRunner.attach(appStartedCompleter: anyNamed('appStartedCompleter'))) when(mockHotRunner.attach(appStartedCompleter: anyNamed('appStartedCompleter')))
.thenAnswer((_) async => 0); .thenAnswer((_) async => 0);
when(mockHotRunnerFactory.build( when(mockHotRunnerFactory.build(
...@@ -370,7 +370,7 @@ void main() { ...@@ -370,7 +370,7 @@ void main() {
when(portForwarder.forwardedPorts) when(portForwarder.forwardedPorts)
.thenReturn(<ForwardedPort>[ForwardedPort(hostPort, devicePort)]); .thenReturn(<ForwardedPort>[ForwardedPort(hostPort, devicePort)]);
when(portForwarder.unforward(any)) when(portForwarder.unforward(any))
.thenAnswer((_) async => null); .thenAnswer((_) async {});
when(mockHotRunner.attach(appStartedCompleter: anyNamed('appStartedCompleter'))) when(mockHotRunner.attach(appStartedCompleter: anyNamed('appStartedCompleter')))
.thenAnswer((_) async => 0); .thenAnswer((_) async => 0);
when(mockHotRunnerFactory.build( when(mockHotRunnerFactory.build(
...@@ -424,7 +424,7 @@ void main() { ...@@ -424,7 +424,7 @@ void main() {
when(portForwarder.forwardedPorts) when(portForwarder.forwardedPorts)
.thenReturn(<ForwardedPort>[ForwardedPort(hostPort, devicePort)]); .thenReturn(<ForwardedPort>[ForwardedPort(hostPort, devicePort)]);
when(portForwarder.unforward(any)) when(portForwarder.unforward(any))
.thenAnswer((_) async => null); .thenAnswer((_) async {});
}); });
testUsingContext('succeeds in ipv4 mode', () async { testUsingContext('succeeds in ipv4 mode', () async {
......
...@@ -202,7 +202,6 @@ void main() { ...@@ -202,7 +202,6 @@ void main() {
expect(environment, <String, String>{ expect(environment, <String, String>{
'VM_SERVICE_URL': 'null', 'VM_SERVICE_URL': 'null',
}); });
return null;
}); });
appStopper = expectAsync1((DriveCommand command) async { appStopper = expectAsync1((DriveCommand command) async {
return true; return true;
......
...@@ -295,7 +295,7 @@ void main() { ...@@ -295,7 +295,7 @@ void main() {
when(os.unzip(any, any)).thenAnswer((Invocation invocation) { when(os.unzip(any, any)).thenAnswer((Invocation invocation) {
final File zipFile = invocation.positionalArguments[0] as File; final File zipFile = invocation.positionalArguments[0] as File;
if (zipFile.path != 'app.ipa') { if (zipFile.path != 'app.ipa') {
return null; return;
} }
final Directory targetDirectory = invocation.positionalArguments[1] as Directory; final Directory targetDirectory = invocation.positionalArguments[1] as Directory;
final String bundlePath1 = final String bundlePath1 =
...@@ -316,7 +316,7 @@ void main() { ...@@ -316,7 +316,7 @@ void main() {
when(os.unzip(any, any)).thenAnswer((Invocation invocation) { when(os.unzip(any, any)).thenAnswer((Invocation invocation) {
final File zipFile = invocation.positionalArguments[0] as File; final File zipFile = invocation.positionalArguments[0] as File;
if (zipFile.path != 'app.ipa') { if (zipFile.path != 'app.ipa') {
return null; return;
} }
final Directory targetDirectory = invocation.positionalArguments[1] as Directory; final Directory targetDirectory = invocation.positionalArguments[1] as Directory;
final Directory bundleAppDir = globals.fs.directory( final Directory bundleAppDir = globals.fs.directory(
......
...@@ -655,7 +655,7 @@ void fakeData( ...@@ -655,7 +655,7 @@ void fakeData(
if (expectSetStamp) { if (expectSetStamp) {
stamp = VersionCheckStamp.fromJson(castStringKeyedMap(json.decode(invocation.positionalArguments[1] as String))); 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})'); 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