This project is read-only.

Unnecessary Argument Checks?

Topics: APIs, General
Jun 5, 2014 at 6:38 AM
Edited Jun 5, 2014 at 6:43 AM
I've been reviewing Roslyn using the source viewer and noticed some occasions where an argument was cast to the same type it was declared as, then a check was made to see if the cast failed.

For example:
(Codeplex doesn't seem to like me linking directly to the line number...)
Line 1145 of:

Should this instead be cast to CSharpSemanticModel? If so, I'd be happy to submit a pull request.

Jun 5, 2014 at 3:45 PM
Yes, it looks like it - probably got missed when we unified on the common symbol model.

(BTW - the line numbers in the source index are links too:
Marked as answer by TomasMatousek on 7/12/2014 at 9:56 PM