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

Fix issue with comparison of string constants #6065

Merged
merged 1 commit into from
Mar 11, 2023

Conversation

cristianoc
Copy link
Collaborator

String constants were compare literally, as part of constant propagation. This means that for example "\a" == "a" was compiled to false even though the two represent the same strings. Unicode and hex escape codes are other examples where literal comparison is not correct.

Implemented a 3-way string comparison: equality returns Some(true), Some(false), or None where the result is not determined.

String constants were compare literally, as part of constant propagation.
This means that for example `"\a" == "a"` was compiled to `false` even though the two represent the same strings.
Unicode and hex escape codes are other examples where literal comparison is not correct.

Implemented a 3-way string comparison: equality returns Some(true), Some(false), or None where the result is not determined.
@cristianoc cristianoc merged commit 6178dce into 10.1_release Mar 11, 2023
@cristianoc cristianoc deleted the string_constants_compare_v10 branch March 11, 2023 06:58
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

1 participant