Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007190OCaml~DO NOT USE (was: OCaml general)public2016-03-21 19:162017-09-24 17:32
Reporterjohnwhitington 
Assigned Tofrisch 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version4.03.0+dev / +beta1Fixed in Version4.03.0+dev / +beta1 
Summary0007190: Inline records error messages could be improved
Description(OCaml 4.03 beta 1)

Consider the following user mistake:

# type t = Foo of {x : int; y : int};;
type t = Foo of { x : int; y : int; }
# Foo (1, 2);;
Error: This form is not allowed as the type of the inlined record could escape.

Would it be possible to improve this to say that (1, 2) has type "int * int" but t.Foo has type "{x : int; y : int}"? The current message doesn't give any hint to help the user fix the mistake.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0015564)
gasche (administrator)
2016-03-21 19:25

I'm setting the target as 4.03, as indeed the errors are fairly bad right now.

# Foo [1; 2];;
Error: This form is not allowed as the type of the inlined record could escape.
# Foo 1;;
Error: This form is not allowed as the type of the inlined record could escape.
(0015567)
frisch (developer)
2016-03-21 22:46

https://github.com/ocaml/ocaml/pull/521 [^]

- Issue History
Date Modified Username Field Change
2016-03-21 19:16 johnwhitington New Issue
2016-03-21 19:24 gasche Status new => confirmed
2016-03-21 19:24 gasche Target Version => 4.03.0+dev / +beta1
2016-03-21 19:25 gasche Note Added: 0015564
2016-03-21 22:46 frisch Note Added: 0015567
2016-03-21 23:13 frisch Status confirmed => resolved
2016-03-21 23:13 frisch Fixed in Version => 4.03.0+dev / +beta1
2016-03-21 23:13 frisch Resolution open => fixed
2016-03-21 23:13 frisch Assigned To => frisch
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)
2017-09-24 17:32 xleroy Status resolved => closed


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker