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

Incorrect comparison of source positions #2390

Closed
kfcripps opened this issue May 21, 2020 · 1 comment
Closed

Incorrect comparison of source positions #2390

kfcripps opened this issue May 21, 2020 · 1 comment
Labels
bug This behavior is unintended and should be fixed. fixed This topic is considered to be fixed.

Comments

@kfcripps
Copy link
Contributor

The == operator of the SourcePosition class (lib/source_file.h:65) is implemented incorrectly.
It should be

return columnNumber == rhs.columnNumber &&
                lineNumber == rhs.lineNumber;

or

return lineNumber == rhs.lineNumber &&
                columnNumber == rhs.columnNumber;

instead of

return columnNumber == rhs.columnNumber &&
                lineNumber == rhs.columnNumber;
@mihaibudiu
Copy link
Contributor

Fixed by #2388

@mihaibudiu mihaibudiu added bug This behavior is unintended and should be fixed. fixed This topic is considered to be fixed. labels May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This behavior is unintended and should be fixed. fixed This topic is considered to be fixed.
Projects
None yet
Development

No branches or pull requests

2 participants