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
Roslynator's code fix for CS8600 erroneously assumes the declaration type to be the problem, when it's actually the cast. So we don't get rid of the warning and in case of var actually introduce broken code.
(Although in case of (2) the declaration could be adjusted by another code fix for the same diagnostic, so at least iteratively applying fixes will arrive at the same result.)
The text was updated successfully, but these errors were encountered:
…ions
Casting a nullable type to a non-nullable type within a variable declaration no longer ignores the cast type and also no longer changes `var` to `var?`.
Fixesdotnet#1392.
…ions
Casting a nullable type to a non-nullable type within a variable declaration no longer ignores the cast type and also no longer changes `var` to `var?`.
Fixesdotnet#1392.
Product and Version Used:
Steps to Reproduce:
The following code reports CS8600 because we cast a nullable type to a non-nullable type as part of a variable declaration.
Roslynator's code fix for CS8600 erroneously assumes the declaration type to be the problem, when it's actually the cast. So we don't get rid of the warning and in case of
var
actually introduce broken code.Actual Behavior:
Expected Behavior:
(Although in case of (2) the declaration could be adjusted by another code fix for the same diagnostic, so at least iteratively applying fixes will arrive at the same result.)
The text was updated successfully, but these errors were encountered: