Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004884OCaml~DO NOT USE (was: OCaml general)public2009-10-02 15:202010-04-30 05:08
Assigned To 
PlatformOSOS Version
Product Version3.11.1 
Target VersionFixed in Version3.12.0+dev 
Summary0004884: optional argument does not work when Some is redefined
DescriptionThe following code fails:
module M = struct
 type t = Some of int
 let f ?(v2=0) v1 = v1 + v2
The problem is probably that optional arguments are soon translated in some other code that uses the Some constructor without specifying the module (Pervasives.Some).
I agree that defining a new Some constructor is probably a bad practice but if OCaml relies on Some not being redefined, then redefining Some should produce an error.
TagsNo tags attached.
Attached Files

- Relationships
has duplicate 0005075closed problem with optional arguments when defining a type with a "Some of <type>" constructor 
related to 0004937closedxclerc Bad interaction between camlp4o and optional arguments 

-  Notes
garrigue (manager)
2010-04-30 05:08

Fixed for 3.12, in revision 10329.
(Same technique as revision 8888)

- Issue History
Date Modified Username Field Change
2009-10-02 15:20 laurent New Issue
2009-12-10 13:21 xclerc Relationship added related to 0004937
2010-04-30 05:08 garrigue Note Added: 0005417
2010-04-30 05:08 garrigue Status new => closed
2010-04-30 05:08 garrigue Resolution open => fixed
2010-04-30 05:08 garrigue Fixed in Version => 3.12.0+dev
2010-06-16 03:25 garrigue Relationship added has duplicate 0005075
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