Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006179OCamlOCaml generalpublic2013-09-16 16:392014-10-10 15:33
Reporterdbuenzli 
Assigned To 
PrioritynormalSeveritytweakReproducibilityhave not tried
StatusresolvedResolutionwon't fix 
PlatformOSOS Version
Product Version4.00.1 
Target VersionFixed in Version 
Summary0006179: Warning 23 is dubious
DescriptionI'm unable to understand the rationale behind that warning.

My take on this is that I may in the future want to add new fields to my record without having to change my copy function and want to live without the warning meanwhile.

# type t = { a : int };;
type t = { a : int; }
# let copy r = { r with a = r.a };;
Warning 23: all the fields are explicitly listed in this record:
the 'with' clause is useless.
val copy : t -> t = <fun>



TagsNo tags attached.
Attached Files

- Relationships
related to 0006608acknowledged Lax typing for functional record updates 

-  Notes
(0010823)
doligez (administrator)
2014-01-21 15:57
edited on: 2014-01-21 15:59

I didn't know this trick. Anyway, if you don't like warning 23, just disable it.

I should add: we get reports of this shape (warning <n> shouldn't exist) for almost all values of <n>, so we tend not to take them very seriously...


- Issue History
Date Modified Username Field Change
2013-09-16 16:39 dbuenzli New Issue
2014-01-21 15:57 doligez Note Added: 0010823
2014-01-21 15:58 doligez Status new => resolved
2014-01-21 15:58 doligez Resolution open => won't fix
2014-01-21 15:59 doligez Note Edited: 0010823 View Revisions
2014-10-10 15:33 doligez Relationship added related to 0006608


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker