Skip to content

Commit

Permalink
Fix --singlemethodname (dotnet#78207)
Browse files Browse the repository at this point in the history
Single method compilation mode broke with the change to use System.CommandLine. "Not specified" no longer means `null`.
  • Loading branch information
MichalStrehovsky authored Nov 13, 2022
1 parent 0461372 commit b6deba5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/coreclr/tools/aot/ILCompiler/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -615,8 +615,7 @@ private MethodDesc CheckAndParseSingleMethodModeArguments(CompilerTypeSystemCont
if (method == null)
throw new CommandLineException($"Method '{singleMethodName}' not found in '{singleMethodTypeName}'");

if (method.HasInstantiation != (singleMethodGenericArgs != null) ||
(method.HasInstantiation && (method.Instantiation.Length != singleMethodGenericArgs.Length)))
if (method.Instantiation.Length != singleMethodGenericArgs.Length)
{
throw new CommandLineException(
$"Expected {method.Instantiation.Length} generic arguments for method '{singleMethodName}' on type '{singleMethodTypeName}'");
Expand Down

0 comments on commit b6deba5

Please sign in to comment.