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

void_checks false positive with FutureOr<void> and NNBD #58205

Closed
a14n opened this issue Jul 14, 2020 · 1 comment · Fixed by dart-lang/linter#2274
Closed

void_checks false positive with FutureOr<void> and NNBD #58205

a14n opened this issue Jul 14, 2020 · 1 comment · Fixed by dart-lang/linter#2274
Assignees
Labels
analyzer-linter Issues with the analyzer's support for the linter package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. linter-false-positive type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@a14n
Copy link
Contributor

a14n commented Jul 14, 2020

// @dart = 2.9
import 'dart:async';

void m(FutureOr<void> Function() f) {}

void main() {
  m(() {}); // void_checks false positive
}
@natebosch
Copy link
Member

Here is another example that is easy to hit with unawaited from package:pedantic (at least until googlearchive/pedantic#69 goes in)

void main() {
  unawaited(Future.value(1).then((_) {})); // Error on argument to then
}

void unawaited(Future<void> f) {}

@srawlins srawlins added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) linter-false-positive labels Oct 8, 2020
@srawlins srawlins self-assigned this Oct 8, 2020
@devoncarew devoncarew added analyzer-linter Issues with the analyzer's support for the linter package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. labels Nov 18, 2024
@devoncarew devoncarew transferred this issue from dart-lang/linter Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-linter Issues with the analyzer's support for the linter package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. linter-false-positive type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants