Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000454OCamlOCaml generalpublic2001-07-27 13:182001-07-27 16:44
Assigned To 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000454: Bug in pattern matching
DescriptionFull_Name: Luc HABERT
Version: 3.01
OS: Linux
Submission from: (

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/", line 0, characters 2139-2151:
Assertion failed

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

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
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

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker