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?
to your account
Original bug ID: 7230
Assigned to: @garrigue
Status: closed (set by @xavierleroy on 2017-09-24T15:32:25Z)
Version: 4.03.0+dev / +beta1
Target version: 4.03.1+dev
Fixed in version: 4.03.0+dev / +beta1
Category: ~DO NOT USE (was: OCaml general)
Monitored by: runhang @stedolan @gasche @hcarty
The following program raises Match_error:
type _ t = T : int t
let _ = match (raise Not_found : float t) with _ -> .
I think it should instead raise Not_found.
More generally, the code of the scrutinee is entirely discarded when a match has only refutation cases, but it should be retained and executed, even though the match itself is guaranteed to fail.
The text was updated successfully, but these errors were encountered:
Comment author: @garrigue
This looks like a question for Luc: the pattern-matching compiler does a lot of optimizations, so it is not so clear what should be done to disable this one only in this precise case.
Sorry, something went wrong.
Fixed in 4.03 and trunk by commits 09bda47 and 40796a2.
Do not close it yet because I would like Luc to check it.
No branches or pull requests