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
Comment #3 by github-bugzilla — 2017-01-04T20:14:30Z
Commit pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/43880932f56f412eb5c3e4fcc395c507c1aa93ad Throw error on duplicate long/short options Fixes Issue 16048
Comment #4 by github-bugzilla — 2017-01-07T03:02:42Z
Comment #5 by github-bugzilla — 2017-01-16T23:25:12Z