-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
dart-archive/linter
#2132Labels
customer-google3devexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.linter-false-positiveIssues related to lint rules that report a problem when it isn't a problem.Issues related to lint rules that report a problem when it isn't a problem.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
int count(String s) => s.length;
final strings = ['a', 'bb', 'ccc', 'dddd'];
final map = Map<String, int>.fromIterable(strings, value: (s) => count(s)); // lint fires here
...apply suggestion...
final map = Map<String, int>.fromIterable(strings, value: count);
error: The function 'count' has type '(String) → int' that isn't of expected type '(dynamic) → int'. This means its parameter or return type does not match what is expected.
Metadata
Metadata
Assignees
Labels
customer-google3devexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.linter-false-positiveIssues related to lint rules that report a problem when it isn't a problem.Issues related to lint rules that report a problem when it isn't a problem.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)