The Wayback Machine - https://web.archive.org/web/20201231140255/https://github.com/commandlineparser/commandline/pull/715
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #714 InvalidCastException when using Nullable Reference Types in Options class #715

Open
wants to merge 5 commits into
base: master
from

Conversation

@rubberduck203
Copy link

@rubberduck203 rubberduck203 commented Nov 21, 2020

No description provided.

The method syntax of SelectMany (flatmap) is the same as having
consecutive `from` statements.
Flatmapping over the property info removes the need to to call First()
rubberduck203 added a commit to rubberduck203/GitNStats that referenced this pull request Nov 23, 2020
There's a bug in the commandline parser library that triggers when an option class has a custom usage function
and that function has more than one attribute.
When a class has nullable reference type properties, it's members are all tagged with the System.Runtime.CompilerServices.NullableAttribute attribute.
Disabling NRTs in just the Options.cs file fixes the bug while still allowing us to use NRTs elsewhere.

A bug has been submitted upstream
commandlineparser/commandline#714

As well as a pull request that fixes the issue
commandlineparser/commandline#715

The compiler directive can be removed once it's accepted and released.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant
You can’t perform that action at this time.