Skip to content
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

Resolve some warnings about string comparisons #1757

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

BCSharp
Copy link
Member

@BCSharp BCSharp commented Dec 11, 2023

No description provided.

@slozier slozier merged commit 0be3c1c into IronLanguages:master Dec 11, 2023
6 of 8 checks passed
@BCSharp BCSharp deleted the string_comp_warn branch December 11, 2023 19:41
@@ -2079,7 +2079,7 @@ internal static partial class CodecsInfo {
#if DEBUG
foreach (KeyValuePair<string, Lazy<Encoding?>> kvp in d) {
// all codecs should be stored in lowercase because we only look up from lowercase strings
Debug.Assert(kvp.Key.ToLower(CultureInfo.InvariantCulture) == kvp.Key);
Debug.Assert(kvp.Key.Equals(kvp.Key, StringComparison.OrdinalIgnoreCase));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh hmm, guess I was a bit quick on the merge here. We want the ToLower conversion since we're asserting that all the keys are lowercase, no?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you are right. I guess I was a bit quick on the commit here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants