Skip to content

Commit 290c71a

Browse files
Allow null in SetDefaultValue (#914)
1 parent ae46306 commit 290c71a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/System.CommandLine/Argument.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public Type ArgumentType
134134
return _defaultValueFactory.Invoke(argumentResult);
135135
}
136136

137-
public void SetDefaultValue(object value)
137+
public void SetDefaultValue(object? value)
138138
{
139139
SetDefaultValueFactory(() => value);
140140
}

src/System.CommandLine/Option.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public virtual Argument Argument
4545
IArgument IOption.Argument => Argument;
4646

4747
public bool Required { get; set; }
48-
48+
4949
string IValueDescriptor.ValueName => Name;
5050

5151
Type IValueDescriptor.ValueType => Argument.ArgumentType;

0 commit comments

Comments
 (0)