Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004186OCaml~DO NOT USE (was: OCaml general)public2006-12-14 21:062006-12-15 05:53
Reportermottl 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version3.09.3 
Target VersionFixed in Version3.10+dev 
Summary0004186: Catch-all pattern does not work with optional arguments
DescriptionThe following is legal:

  let f ~x:_ () = ()

But the following will lead to a syntax error:

  let f ?x:_ () = ()

Interestingly, the following works:

  let f ?x:_foo () = ()

It should be possible to use a plain underscore with optional arguments, too, for consistency.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0003880)
garrigue (manager)
2006-12-15 05:53

This was indeed a bug. Camlp4 worked correctly.
Fixed in both HEAD and release309.

- Issue History
Date Modified Username Field Change
2006-12-14 21:06 mottl New Issue
2006-12-15 05:53 garrigue Status new => closed
2006-12-15 05:53 garrigue Note Added: 0003880
2006-12-15 05:53 garrigue Resolution open => fixed
2006-12-15 05:53 garrigue Fixed in Version => 3.10+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