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

Closed
vicuna opened this issue Dec 14, 2006 · 1 comment
Closed

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

vicuna opened this issue Dec 14, 2006 · 1 comment
Labels

Comments

@vicuna
Copy link

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

@vicuna
Copy link
Author

vicuna 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 as completed 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
Labels
Projects
None yet
Development

No branches or pull requests

1 participant