Bug 16048 – std.getopt: duplicated options are not detected
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-05-19T15:33:00Z
Last change time
2017-01-16T23:25:12Z
Assigned to
nobody
Creator
andrej.mitrovich
Comments
Comment #0 by andrej.mitrovich — 2016-05-19T15:33:40Z
If you have multiple config options such as:
-----
getopt(args, "arg1|a", &arg1, "arg2|a", &arg2);
-----
Getopt won't complain about this, and will parse all 'a' options into arg1.
Comment #1 by andrej.mitrovich — 2016-11-21T23:14:39Z
In fact duplicate long options aren't detected either.
Comment #2 by andrej.mitrovich — 2016-11-21T23:36:13Z