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

Enable avoid_dynamic_calls lint #2410

Merged
merged 13 commits into from
Oct 29, 2024
Prev Previous commit
Next Next commit
Back as a cast
  • Loading branch information
natebosch committed Oct 21, 2024
commit 8d0a7a850048c97e5673356c36499e9f04a0100b
3 changes: 1 addition & 2 deletions pkgs/matcher/lib/src/expect/throws_matcher.dart
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ class Throws extends AsyncMatcher {
}

try {
item as Object? Function();
var value = item();
var value = (item as Function)();
if (value is Future) {
return _matchFuture(value, 'returned a Future that emitted ');
}
Expand Down