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 existing shorthand_operator rule causes false positives for operands that don't support the suggested shorthand operator. Examples have been brought up in #3603, #3643 and #4936. The rule doesn't know anything about the operands' types so such mistakes are unavoidable and must be accepted.
A new typesafe version of shorthand_operator could be added, however, that knows depending on the types of the operands if a shorthand operator is supported or not. It can be based on the existing rule with additional type information at hand.
A similar pair of rules is already available with ArrayInitRule and TypesafeArrayInitRule.
The text was updated successfully, but these errors were encountered:
The existing
shorthand_operator
rule causes false positives for operands that don't support the suggested shorthand operator. Examples have been brought up in #3603, #3643 and #4936. The rule doesn't know anything about the operands' types so such mistakes are unavoidable and must be accepted.A new typesafe version of
shorthand_operator
could be added, however, that knows depending on the types of the operands if a shorthand operator is supported or not. It can be based on the existing rule with additional type information at hand.A similar pair of rules is already available with
ArrayInitRule
andTypesafeArrayInitRule
.The text was updated successfully, but these errors were encountered: