Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't do a plain "return" in a Future<void> function (but can in Future<Null>) #32548

Closed
Hixie opened this issue Mar 15, 2018 · 1 comment
Closed
Labels
closed-duplicate Closed in favor of an existing report

Comments

@Hixie
Copy link
Contributor

Hixie commented Mar 15, 2018

I believe the warning below is wrong.

import 'dart:async';

void foo1() {
  return;
}

Null foo2() {
  return;
}

Future<void> foo3() async {
  return; // warning • Missing return value after 'return' at test.dart:12:3 • return_without_value                                                                                                                                                            
}

Future<Null> foo4() async {
  return;
}

void main() { }
@matanlurey matanlurey added the closed-duplicate Closed in favor of an existing report label Mar 15, 2018
@matanlurey
Copy link
Contributor

Duplicate of #32443.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-duplicate Closed in favor of an existing report
Projects
None yet
Development

No branches or pull requests

2 participants