You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on unblocking SDK with latest S.CL update in dotnet/sdk#29012 I've realized that in #1951 we have moved argument and option extension methods to the types themselves, but unfortunately, we have also made these methods non-generic. It does not allow to re-use the returned value when we need a generic value.
Example:
publicstaticreadonlyArgument<string>CmdPackageArgument=newArgument<string>(LocalizableStrings.CmdPackage){Description=LocalizableStrings.CmdPackageDescription}.AddCompletions((context)=>QueryNuGet(context.WordToComplete).Select(match =>newCompletionItem(match)));// currently `AddCompletions` returns an `Argument` rather than `Argument<string>`
Cannot implicitly converttype 'System.CommandLine.Argument' to 'System.CommandLine.Argument<string>'. An explicit
conversion exists
While working on unblocking SDK with latest S.CL update in dotnet/sdk#29012 I've realized that in #1951 we have moved argument and option extension methods to the types themselves, but unfortunately, we have also made these methods non-generic. It does not allow to re-use the returned value when we need a generic value.
Example:
cc @jozkee @jonsequitur
The text was updated successfully, but these errors were encountered: