Replies: 4 comments 1 reply
-
Are you talking about dotnet/roslyn#45030? |
Beta Was this translation helpful? Give feedback.
-
Does your This is not new, and the language team have always said that refactoring suggestions are not guaranteed to behave identical to what the code does prior, specifically because of cases like this. Now, could the analyzer detect that the type has an overloaded Now, if you don't have an overloaded |
Beta Was this translation helpful? Give feedback.
-
@Joe4evr. I agree with you with the overloaded behavior. On one object I indeed have an overloaded operator, but on the other I do not have any == overloads. As stated above I'm trying to find the issue and come back. |
Beta Was this translation helpful? Give feedback.
-
Found it: #4433 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have already reported this problem which already has been identified by other and seems to be a compiler bug, but I cannot find my original post.
Originally I'm checking reference types by comparing it to null
if (ReferenceType == null) throw ArgumentNullException();
Now, the analyzers suggest, I should to do
if (ReferenceType is null) throw ArgumentNullException();
But this seems to be a problem in some cases and falls through the condition even if the ReferenceType is null. Finding these problems is really annoying and it would really be helpful if this problem is solved.
Maybe someone could link me to the original finding of this problem.
Beta Was this translation helpful? Give feedback.
All reactions