-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
dart-archive/linter
#4542Closed
Copy link
Labels
P1A high priority bug; for example, a single project is unusable or has many test failuresA high priority bug; for example, a single project is unusable or has many test failuresdevexp-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.linter-set-recommendedtype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
For the code below:
class Foo {
Object? value;
bool equals(Object other) => switch (other) {
Foo(: var value) => this.value == value,
_ => false
};
}the 3.0.0 analyzer will print
info - test.dart:5:25 - Unnecessary 'this.' qualifier. Try removing 'this.'. - unnecessary_this
This is incorrect. The this. is necessary to disambiguate the containing class's value field from the value variable bound by the switch expression.
Metadata
Metadata
Assignees
Labels
P1A high priority bug; for example, a single project is unusable or has many test failuresA high priority bug; for example, a single project is unusable or has many test failuresdevexp-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.linter-set-recommendedtype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)