| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
IsExpression(:var expression) => expression == expr,I thought of a few other expressions that can promote too:
Not sure how important it is to detect all of these (the `self ?? (throw ...)` case is particularly obscure), so your call whether to add more checks.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Add a lint to flag local variables created to promote `this`.
I think this covers the behavior outlined in the doc, but please check
to see whether I missed any cases that either should or shouldn't be
reported.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
I thought of a few other expressions that can promote too:
- `self?.property` (e.g., `self?.x = self.y`)
- `self?.method(...)` (e.g., `self?.f(self.x)`)
- `self?[...]` (e.g., `self?[self.x]` or `self?[self.x] = self.y`
- `self?..cascadeSections`
- Anonymous method syntax (assuming anonymous methods are enabled): `self.{...}`, `self.(...) {...}`, `self.=> ...`, `self.(...) => ...`
- `self ?? ...` (e.g., `self ?? (throw ...)` promotes `self` to non-nullable in the code that follows)
Not sure how important it is to detect all of these (the `self ?? (throw ...)` case is particularly obscure), so your call whether to add more checks.
Addressed by https://dart-review.googlesource.com/c/sdk/+/532320.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |