Skip to content

Conversation

@CreepyGnome
Copy link
Contributor

Removed where T : new() from the ParseArguments factory method as it
shouldn't be required if convention is followed of only mutable classes
required a default constructor, and immutable classes are supported and
do not have this requirement, so the new() restriction is blocking
immutable classes which should typically not have a default constructor.

This resolves#310

Removed where T : new() from the ParseArguments<T> factory method as it shouldn't be required if convention is followed of only mutable classes required a default constructor, and immutable classes are supported and do not have this requirement, so the new() restriction is blocking immutable classes which should typically not have a default constructor.
@clmcgrath
Copy link

can we merge this please been over a year waiting on this fix

@ericnewton76
Copy link

Note: We have moved the project to a more team managed repository. Please resubmit any pull requests to https://github.com/commandlineparser/commandline Sorry for inconveniences.

@CreepyGnome
Copy link
ContributorAuthor

CreepyGnome commented Nov 5, 2017

You had over a year to deal with this PR, long before you created a new repo. If you still have this issue and still would like to address it feel free to just copy and paste the changes where needed or reimplement your own solution.

@CreepyGnomeCreepyGnome deleted the Issue310 branch September 23, 2022 04:21
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parser.ParseArguments(factory, args) requires parameterless constructor

3 participants

@CreepyGnome@clmcgrath@ericnewton76