Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007230OCaml~DO NOT USE (was: OCaml general)public2016-04-16 21:462017-09-24 17:32
Reporteryallop 
Assigned Togarrigue 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version4.03.0+dev / +beta1 
Target Version4.03.1+devFixed in Version4.03.0+dev / +beta1 
Summary0007230: Scrutinee discarded in match with only refutation cases
DescriptionThe 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.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0015780)
garrigue (manager)
2016-04-18 10:15

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.
(0015838)
garrigue (manager)
2016-04-22 04:26

Fixed in 4.03 and trunk by commits 09bda47 and 40796a2.

Do not close it yet because I would like Luc to check it.

- Issue History
Date Modified Username Field Change
2016-04-16 21:46 yallop New Issue
2016-04-18 10:15 garrigue Note Added: 0015780
2016-04-18 11:42 doligez Status new => acknowledged
2016-04-18 11:42 doligez Target Version => 4.03.1+dev
2016-04-18 11:44 doligez Status acknowledged => confirmed
2016-04-22 04:26 garrigue Note Added: 0015838
2016-04-22 04:26 garrigue Status confirmed => resolved
2016-04-22 04:26 garrigue Fixed in Version => 4.03.0+dev / +beta1
2016-04-22 04:26 garrigue Resolution open => fixed
2016-04-22 04:26 garrigue Assigned To => garrigue
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)
2017-09-24 17:32 xleroy Status resolved => closed


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker