You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 7230 Reporter:@yallop Assigned to:@garrigue Status: closed (set by @xavierleroy on 2017-09-24T15:32:25Z) Resolution: fixed Priority: normal Severity: minor 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
Bug description
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:
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.
Original bug ID: 7230
Reporter: @yallop
Assigned to: @garrigue
Status: closed (set by @xavierleroy on 2017-09-24T15:32:25Z)
Resolution: fixed
Priority: normal
Severity: minor
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
Bug description
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: