Skip to content

Commit fb9fbc2

Browse files
committed
fix #811
1 parent 587d3cd commit fb9fbc2

File tree

1 file changed

+5
-17
lines changed

1 file changed

+5
-17
lines changed

src/System.CommandLine/Parsing/SymbolResult.cs

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -63,24 +63,12 @@ protected internal ValidationMessages ValidationMessages
6363

6464
internal void AddToken(Token token) => _tokens.Add(token);
6565

66-
internal ArgumentResult GetOrCreateDefaultArgumentResult(Argument argument)
67-
{
68-
return _defaultArgumentValues.GetOrAdd(
66+
internal ArgumentResult GetOrCreateDefaultArgumentResult(Argument argument) =>
67+
_defaultArgumentValues.GetOrAdd(
6968
argument,
70-
arg =>
71-
{
72-
var argumentResult = new ArgumentResult(
73-
argument,
74-
this);
75-
76-
if (arg is Argument a)
77-
{
78-
a.GetDefaultValue(argumentResult);
79-
}
80-
81-
return argumentResult;
82-
});
83-
}
69+
arg => new ArgumentResult(
70+
argument,
71+
this));
8472

8573
internal bool UseDefaultValueFor(IArgument argument)
8674
{

0 commit comments

Comments
 (0)