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

Ocaml does not warn about invalid wildcard uses #4717

Closed
vicuna opened this issue Feb 13, 2009 · 0 comments
Closed

Ocaml does not warn about invalid wildcard uses #4717

vicuna opened this issue Feb 13, 2009 · 0 comments

Comments

@vicuna
Copy link

vicuna commented Feb 13, 2009

Original bug ID: 4717
Status: closed (set by @damiendoligez on 2009-12-08T16:50:06Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.11.0
Fixed in version: 3.12.0+dev
Category: ~DO NOT USE (was: OCaml general)
Duplicate of: #4675
Has duplicate: #4835
Child of: #4052
Monitored by: "Richard Jones"

Bug description

the following code:

let f = function
| Some x -> x
| None _ -> 0;;

yields an error using OCaml 3.10.2 but compiles fine using OCaml 3.11.0 (Linux platform)

Additional information

Objective Caml version 3.10.2

let f = function

| Some x -> x
| None _ -> 0;;

Characters 39-45:
| None _ -> 0;;
^^^^^^
The constructor None expects 0 argument(s),
but is here applied to 1 argument(s)

    Objective Caml version 3.11.0

let f = function

| Some x -> x
| None _ -> 0;;

val f : int option -> int =

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant