Closed
Description
The test in CommandLine.Core.TypeConverter.ToEnum which calls Enum.IsDefined is broken if the given enum has the Flags attribute (i.e it ONLY checks if the EXACT given value maps to an enum member, that will never be true for flag combinations of enum members).
This prevents having strongly types enum arguments that are passed on the command line, which is not an uncommon thing (especially in Windows where TONS of interesting data is described via flag style enums).
A workaround is to pass as a raw int/uint/ulong/whatever and just cast inside the program, but thats less ideal than just typing the command line param as what it actually is.
Metadata
Metadata
Assignees
Labels
No labels