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
It would be nice to have an analyzer rule to prefer one form or the other for consistency. Personally, I find the new both unnecessary and misleading when the type is less obvious.
Describe suggestions on how to achieve the rule
Warn when a non-empty target_typed_new expression is used to construct ValueTuple<>.
Additional context
Perhaps these expressions differ in ways I'm unaware of and there is reason to mix both in a project?
The text was updated successfully, but these errors were encountered:
Describe the problem you are trying to solve
Inconsistent use of
new
for tuple construction making code misleading or harder to read.In several situations, tuple can be constructed either from a
tuple_expression
or by atarget_typed_new
expression. For example:It would be nice to have an analyzer rule to prefer one form or the other for consistency. Personally, I find the
new
both unnecessary and misleading when the type is less obvious.Describe suggestions on how to achieve the rule
Warn when a non-empty
target_typed_new
expression is used to constructValueTuple<>
.Additional context
Perhaps these expressions differ in ways I'm unaware of and there is reason to mix both in a project?
The text was updated successfully, but these errors were encountered: