Add option to the analyzer (also in Editor) that specifies to assume that the keyword "var" is a type inferred specifier #17945
Labels
analyzer-warning
Issues with the analyzer's Warning codes
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
P2
A bug or feature request we're likely to work on
type-enhancement
A request for a change that isn't a bug
This issue was originally filed by andrew.m...@gmail.com
Add option to the analyzer (also in Editor) that specifies to assume that the keyword in an type inferred specifier.
Sample code and explanation.
void main() {
var i = 0;
i = "";
}
Option turned off (current behavior):
No warrning, because "var" is dynamic type alias.
Option turned on.
Warning: "A value of type 'String' cannot be assigned to a variable of type 'int'".
The text was updated successfully, but these errors were encountered: