Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch-all pattern does not work with optional arguments #4186

vicuna opened this Issue Dec 14, 2006 · 1 comment


None yet
1 participant
Copy link

commented Dec 14, 2006

Original bug ID: 4186
Reporter: @mmottl
Status: closed (set by @garrigue on 2006-12-15T04:53:25Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.09.3
Fixed in version: 3.10+dev
Category: ~DO NOT USE (was: OCaml general)
Monitored by: @mmottl

Bug description

The 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.


This comment has been minimized.

Copy link
Collaborator Author

commented Dec 15, 2006

Comment author: @garrigue

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

@vicuna vicuna closed this Dec 15, 2006

@vicuna vicuna added the bug label Mar 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.