Skip to content

Commit

Permalink
Check the variable type in prefer_typing_uninitialized_variables to a…
Browse files Browse the repository at this point in the history
…ccount for type inference
  • Loading branch information
bwilkerson committed Jul 10, 2020
1 parent fd23864 commit 30730b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/rules/prefer_typing_uninitialized_variables.dart
Expand Up @@ -85,7 +85,7 @@ class _Visitor extends SimpleAstVisitor<void> {
}

node.variables.forEach((v) {
if (v.initializer == null) {
if (v.initializer == null && v.declaredElement.type.isDynamic) {
rule.reportLint(v);
}
});
Expand Down

0 comments on commit 30730b9

Please sign in to comment.