You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not simply returning this just to have a "fluid interface" - it also might return a new instance. So I don't believe the lint is intended to trigger in this case?
To Reproduce
Check out the build repo (https://github.com/dart-lang/build) at this commit e4d6b8d8d5ed01752c6726e2dcc324a1d60d8d6d, on the latest dev sdk, and run analyzer in the build directory.
Expected behavior
I don't expect to see any lints.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Agree. The argument for not returning this is that you should use cascades instead of chaining. That only makes sense if the return this; is unconditional, otherwise chaining won't be the same as cascades anyway.
Describe the issue
On the latest dev (2.19.0-398.0.dev) we started seeing this lint trigger for the following code:
This is not simply returning this just to have a "fluid interface" - it also might return a new instance. So I don't believe the lint is intended to trigger in this case?
To Reproduce
Check out the build repo (https://github.com/dart-lang/build) at this commit e4d6b8d8d5ed01752c6726e2dcc324a1d60d8d6d, on the latest dev sdk, and run analyzer in the
build
directory.Expected behavior
I don't expect to see any lints.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: