Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005560OCamlOCaml typingpublic2012-03-27 09:242012-03-28 02:45
Reporterfrisch 
Assigned Togarrigue 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version4.00.0+dev 
Summary0005560: Typing of tuple patterns with -principal
DescriptionIn 4.00 or trunk with -principal:

# let (a, b) = (raise Exit : int * int);;
Error: This pattern matches values of type 'a * 'b
       but a pattern was expected which matches values of type int * int

This error does not happen without -principal or with OCaml 3.11.2.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0007182)
frisch (developer)
2012-03-27 09:36

Same with records and sum types:

# type t = {foo:int};;
type t = { foo : int; }
# let {foo} = (raise Exit : t);;
Error: This pattern matches values of type t
       but a pattern was expected which matches values of type t


# type s = A of int;;
type s = A of int
# let (A x) = (raise Exit : s);;
Error: This pattern matches values of type s
       but a pattern was expected which matches values of type s
(0007205)
garrigue (manager)
2012-03-28 02:45

Fixed in 4.00 and trunk, file typecore.ml, at revisions 12286 and 12287.

- Issue History
Date Modified Username Field Change
2012-03-27 09:24 frisch New Issue
2012-03-27 09:24 frisch Status new => assigned
2012-03-27 09:24 frisch Assigned To => garrigue
2012-03-27 09:36 frisch Note Added: 0007182
2012-03-28 02:45 garrigue Note Added: 0007205
2012-03-28 02:45 garrigue Status assigned => closed
2012-03-28 02:45 garrigue Resolution open => fixed
2012-03-28 02:45 garrigue Fixed in Version => 4.00.0+dev


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker