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
The test runs successfully but with code coverage we can see that the line
return shadow + (other ?? 0) as T;
never gets called which leads me to the speculation that shadow always equals to NULL when the extension is called and the extension is not "attached" if T is not null.
The text was updated successfully, but these errors were encountered:
@gaddlord as far as i understand, in your example precedence gets default int + operator.
int and double are not strictly classes, because they are implemented on the platform-specific basis, thus it can be considered a corner case.
well, you still can get expected behavior with explicit spec, like on screenshot
RE: https://github.com/vandadnp/flutter-tips-and-tricks/blob/main/tipsandtricks/null-aware-infix-operators-in-dart/null-aware-infix-operators-in-dart.md
Having:
and the test:
The test runs successfully but with code coverage we can see that the line
never gets called which leads me to the speculation that shadow always equals to NULL when the extension is called and the extension is not "attached" if T is not null.
The text was updated successfully, but these errors were encountered: