Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005075OCaml~DO NOT USE (was: OCaml general)public2010-06-15 16:382010-06-16 03:25
Assigned To 
PlatformOSOS Version
Product Version3.11.1 
Target VersionFixed in Version3.12.0+dev 
Summary0005075: problem with optional arguments when defining a type with a "Some of <type>" constructor
DescriptionWhen compiling with "ocamlc -c" the following code:
"type t = Some of int
let func ?(modifies=ref false) _ = ()"
the following error is obtained:
"File "", line 2, characters 20-29:
Error: This pattern matches values of type 'a option
       but a pattern was expected which matches values of type t"
This is due to the fact that optional arguments "are actually implemented as option types". This could have been avoided if option type was defined in Pervasives but it is a built-in type.
TagsNo tags attached.
Attached Files

- Relationships
duplicate of 0004884closed optional argument does not work when Some is redefined 

-  Notes
garrigue (manager)
2010-06-16 03:25

Already fixed for 3.12.

- Issue History
Date Modified Username Field Change
2010-06-15 16:38 nobelius New Issue
2010-06-16 03:25 garrigue Relationship added duplicate of 0004884
2010-06-16 03:25 garrigue Note Added: 0005553
2010-06-16 03:25 garrigue Status new => closed
2010-06-16 03:25 garrigue Resolution open => fixed
2010-06-16 03:25 garrigue Fixed in Version => 3.12.0+dev
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