Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004717OCamlOCaml generalpublic2009-02-13 18:252009-12-08 17:50
ReporterSebastien Furic 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version3.11.0 
Target VersionFixed in Version3.12.0+dev 
Summary0004717: Ocaml does not warn about invalid wildcard uses
Descriptionthe 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 = <fun>
TagsNo tags attached.
Attached Files

- Relationships
duplicate of 0004675closed Compiler fails to warn about pattern Top _ when Top is a 0-ary constructor 
has duplicate 0004835closed None _ accepted as pattern match 
child of 0004052closed Constructeur constant et _ 

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2009-02-13 18:25 Sebastien Furic New Issue
2009-02-16 10:05 ertai Relationship added child of 0004052
2009-02-16 10:05 ertai Relationship added duplicate of 0004675
2009-04-27 17:12 doligez Status new => acknowledged
2009-07-15 15:07 xclerc Relationship added has duplicate 0004835
2009-12-08 17:50 doligez Status acknowledged => closed
2009-12-08 17:50 doligez Resolution open => fixed
2009-12-08 17:50 doligez Fixed in Version => 3.12.0+dev


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker