Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004186OCamlOCaml generalpublic2006-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


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker