-
Notifications
You must be signed in to change notification settings - Fork 418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix diagnostics from loaded cake files shown in the current file #1201
Fix diagnostics from loaded cake files shown in the current file #1201
Conversation
ping @jnm2 |
|
||
bool PathsAreEqual(string x, string y) | ||
{ | ||
if (x == null && y == null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be ReferenceEquals(x, y)
to be even more efficient in case the same string instance happens to be reused.
{ | ||
return true; | ||
} | ||
if (x == null || y == null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another tip I had from a contributor at corefx was that x == null | y == null
performs better than the branch introduced by ||
. Not that this is performance-critical though.
7f84c60
to
e740da6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
Fixes issue reported here