unnecessary_statements
shouldn't trigger when the operator is overloaded #59188
Closed
Description
Say you some code that overloads an operator:
class Logger {
void operator<<(String message) {/*...*/}
}
void main() {
final l = Logger();
l << "Hello world (づ。◕‿‿◕。)づ";
// Unnecessary statement.
// Try completing the statement or breaking it up. (unnecessary_statements)
}
The lint trigger when it shouldn't as the statement has a clear effect here.