Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000454OCaml~DO NOT USE (was: OCaml general)public2001-07-27 13:182001-07-27 16:44
Reporteradministrator 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000454: Bug in pattern matching
DescriptionFull_Name: Luc HABERT
Version: 3.01
OS: Linux
Submission from: bastet.loria.fr (152.81.7.147)


This message may be redundant with fixed/342, but I am not sure, so I prefer to
repeat it.

The following program :
    
  type a=
    | A of c
    | B of c
  
  and c={lvar:int; lassoc: c;lnb:int}
  
  
  let foo=function
    | (A {lnb=i}|B {lnb=i}) when i=0 -> ()
    | A {lassoc=({lnb=j});lnb=i} ->()
    | _ -> ()

causes the compiler (as well ocamlc as ocamlopt) to crash with the message :

  >> Fatal error: Matching.filter_ctx
  Uncaught exception: Misc.Fatal_error

If I remove the field lvar in the definition of c, then I get :

  Uncaught exception: File "bytecomp/matching.ml", line 0, characters 2139-2151:
Assertion failed

This bug occurs only if the first two cases of the match are present _in this
order_.
 

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000624)
administrator (administrator)
2001-07-27 16:44

Luc: Fixed 2001-07-21
Nasty record in pattern bug.

- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue
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)


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker