Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006414OCamlOCaml typingpublic2014-05-12 23:272014-05-14 17:09
Reporteryallop 
Assigned Togasche 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version4.02.0+dev 
Target VersionFixed in Version 
Summary0006414: Strings incorrectly type-checked in tuple context
DescriptionIn trunk:

  # if true then 1, 2 else "";;
  Fatal error: exception Ctype.Unify(_)
Tagspatch
Attached Filespatch file icon fix-string-typing.patch [^] (705 bytes) 2014-05-12 23:38 [Show Content]

- Relationships

-  Notes
(0011435)
yallop (developer)
2014-05-12 23:40

It looks like the problem comes from the attempt to match strings against format tuples, which doesn't catch unification errors. I've attached a patch which fixes the immediate problem when applied, but I'm not sure that it's the right solution.
(0011436)
gasche (developer)
2014-05-13 06:53

This part of the GADT patch is a bit hacky, and not there to stay anyway: the right solution is to use a nominal type for formats (it will also avoid printed error messages to print both the type and its definition); it is planned, but I didn't have time to do it properly before the merge.
(0011461)
gasche (developer)
2014-05-14 17:09

Fixed in trunk@14868 and 4.02@14866.

- Issue History
Date Modified Username Field Change
2014-05-12 23:27 yallop New Issue
2014-05-12 23:38 yallop File Added: fix-string-typing.patch
2014-05-12 23:40 yallop Note Added: 0011435
2014-05-13 06:53 gasche Note Added: 0011436
2014-05-13 06:53 gasche Assigned To => gasche
2014-05-13 06:53 gasche Status new => assigned
2014-05-13 09:18 doligez Tag Attached: patch
2014-05-14 17:09 gasche Note Added: 0011461
2014-05-14 17:09 gasche Status assigned => resolved
2014-05-14 17:09 gasche Resolution open => fixed


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker