Skip to content

prefer_void_to_null shouldn't lint for local variables. #58906

@asashour

Description

@asashour

Describe the issue
prefer_void_to_null should not be triggered for local variable.

The reason is: local variable can not be void.

To Reproduce

void f() {
  Null a; 
  a.toString();
}

Expected behavior
There is no lint.

Metadata

Metadata

Assignees

Labels

P2A bug or feature request we're likely to work ondevexp-linterIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.linter-set-recommended

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions