We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I've identified what looks like a bug in pattern matching (function head selection) in OTP 19.0.x, but only on some platforms.
A minimal repro case (one file, one test) is available at https://github.com/scouten/otp-pattern-match. This is a very stripped down version of sqlitex, where I first encountered the bug.
If you examine the Travis CI build logs at https://travis-ci.org/scouten/otp-pattern-match/builds/186425073, you'll see that the test fails on OTP 19.0, but succeeds on 18.0, 19.1, and 19.2.
The bug is essentially that the code fails to match the translate_value clause at https://github.com/scouten/otp-pattern-match/blob/master/lib/pattern_match_bug.ex#L11 in my example. It instead falls through to the catch-all clause at line 23 and thus generates an unwanted result.
translate_value
Test matches https://github.com/scouten/otp-pattern-match/blob/master/lib/pattern_match_bug.ex#L11 on all OTP versions.
The text was updated successfully, but these errors were encountered:
This is likely an OTP bug (and could well be closed as such), but wanted to make sure Elixir core team was aware of it.
I will discontinue testing my code on OTP 19.0 for now. 🙂
Sorry, something went wrong.
It is a known bug that has been fixed. Here is the test case added to OTP: erlang/otp@8b83bc0
Since it was fixed on later 19.0 releases, I believe the OS difference is caused by the version in the OS package manager.
Thanks for the report!
No branches or pull requests
I've identified what looks like a bug in pattern matching (function head selection) in OTP 19.0.x, but only on some platforms.
Environment
Current behavior
A minimal repro case (one file, one test) is available at https://github.com/scouten/otp-pattern-match. This is a very stripped down version of sqlitex, where I first encountered the bug.
If you examine the Travis CI build logs at https://travis-ci.org/scouten/otp-pattern-match/builds/186425073, you'll see that the test fails on OTP 19.0, but succeeds on 18.0, 19.1, and 19.2.
The bug is essentially that the code fails to match the
translate_value
clause at https://github.com/scouten/otp-pattern-match/blob/master/lib/pattern_match_bug.ex#L11 in my example. It instead falls through to the catch-all clause at line 23 and thus generates an unwanted result.Expected behavior
Test matches https://github.com/scouten/otp-pattern-match/blob/master/lib/pattern_match_bug.ex#L11 on all OTP versions.
The text was updated successfully, but these errors were encountered: