From c45a73b590cfb30831d72d8256d0139f867e1dfe Mon Sep 17 00:00:00 2001 From: Jon Sequeira Date: Sat, 22 Jan 2022 09:08:36 -0800 Subject: [PATCH] fix #1586 --- src/System.CommandLine/Option.cs | 2 +- src/System.CommandLine/Option{T}.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/System.CommandLine/Option.cs b/src/System.CommandLine/Option.cs index b8fd96a77f..77ff4c47c1 100644 --- a/src/System.CommandLine/Option.cs +++ b/src/System.CommandLine/Option.cs @@ -169,7 +169,7 @@ public string? ArgumentHelpName public virtual ArgumentArity Arity { get => Argument.Arity; - init + set { if (value.MaximumNumberOfValues > 0) { diff --git a/src/System.CommandLine/Option{T}.cs b/src/System.CommandLine/Option{T}.cs index d5e3e82bfe..0d890c814b 100644 --- a/src/System.CommandLine/Option{T}.cs +++ b/src/System.CommandLine/Option{T}.cs @@ -65,7 +65,7 @@ public Option( public override ArgumentArity Arity { get => base.Arity; - init => Argument.Arity = value; + set => Argument.Arity = value; } } } \ No newline at end of file