Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005075OCamlOCaml generalpublic2010-06-15 16:382010-06-16 03:25
Reporternobelius 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
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 "test.ml", 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
(0005553)
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


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker