Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004904OCamlOCaml generalpublic2009-10-30 16:522016-12-17 00:35
Reporterlukstafi 
Assigned Tofrisch 
PrioritynormalSeverityfeatureReproducibilityalways
StatusassignedResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0004904: Warn about repeated function arguments especially for optional arguments
DescriptionIf this feature is implemented, the warning should be on by default.

# let f ?(a=0) b ?(a=0) c = a+b+c;;
val f : ?a:int -> int -> ?a:int -> int -> int = <fun>
# f ~a:7 1 2;;
- : int = 3
TagsNo tags attached.
Attached Files

- Relationships
has duplicate 0007029closedgarrigue Proposal: flag duplicate parameters as error 

-  Notes
(0016967)
shinwell (developer)
2016-12-12 16:37

@garrigue Ping (from 2010)...
(0016988)
garrigue (manager)
2016-12-13 01:42

This case is covered by warning 27, which is not enabled by default.
Should we move it to warning 26 (which is enabled by default)?
What could be a good criterion? A combination of unused variable and shadowing?

I move it to Alain, since he is our unused variable specialist...
(0017020)
lukstafi (reporter)
2016-12-17 00:35
edited on: 2016-12-17 00:35

As the original reporter, I would not object for this bug to be closed; perhaps as "Won't fix" -- referring to making this case enabled -- if the unused variable detection "warning 27" is covering this case since time immemorial. If this case (with labeled arguments) can be easily/efficiently differentiated though, it would still be beneficial to move it to warning 26 I think.


- Issue History
Date Modified Username Field Change
2009-10-30 16:52 lukstafi New Issue
2010-04-30 03:26 garrigue Status new => assigned
2010-04-30 03:26 garrigue Assigned To => garrigue
2016-12-12 16:37 shinwell Note Added: 0016967
2016-12-12 16:39 shinwell Relationship added has duplicate 0007029
2016-12-13 01:42 garrigue Note Added: 0016988
2016-12-13 01:42 garrigue Assigned To garrigue => frisch
2016-12-13 01:42 garrigue Status assigned => feedback
2016-12-17 00:35 lukstafi Note Added: 0017020
2016-12-17 00:35 lukstafi Status feedback => assigned
2016-12-17 00:35 lukstafi Note Edited: 0017020 View Revisions


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker