Dictionary exposes internal type comparer#16151
Conversation
|
@maryamariyan could you please guide @MarcoRossignoli through writing a matching CoreFX test, and help him verify it against his private CoreCLR change? Since you have been doing this recnetly. |
|
@danmosemsft sure. @MarcoRossignoli here's what you need to do:
|
|
@dotnet-bot test Tizen armel Cross Checked Innerloop Build and Test please |
| get | ||
| { | ||
| return _comparer; | ||
| return (_comparer is NonRandomizedStringEqualityComparer) ? (IEqualityComparer<TKey>)EqualityComparer<string>.Default : _comparer; |
There was a problem hiding this comment.
Shouldn't this be EqualityComparer<TKey> rather than EqualityComparer<string>? Maybe we're just not testing this code path?
There was a problem hiding this comment.
Ah, I see why it works ok... TKey must be a string for _comparer to get set to NonRandomizedStringEqualityComparer.
There was a problem hiding this comment.
actually compile also with TKey because the constraints are respected and for now we've only optimization with string TKey, i think with EqualityComparer of string the intentions are more clear. Do you agree?
Fixes dotnet/corefx#26033 Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Fixes dotnet/corefx#26033 Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
Fixes dotnet/corefx#26033 Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
Fixes dotnet/corefx#26033 Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Fixes dotnet/corefxdotnet/coreclr#26033 Commit migrated from dotnet/coreclr@8aa7f12
Fixes https://github.com/dotnet/corefx/issues/26033
This is my first pull on this repo(maybe i'm in the wrong place). I don't know if there is a "guide" to do "cross repo" test for core*.
If i want to add a test on corefx with this "merge", do i have to wait and clean/rebuild?
cc: @jkotas