Browse Source

Improve naming of delegate-typed variables.

net10upgrade-future
Siegfried Pammer 18 hours ago
parent
commit
6bdbb1fc84
  1. 8
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/DelegateConstruction.cs
  2. 2
      ICSharpCode.Decompiler/IL/ILTypeExtensions.cs

8
ICSharpCode.Decompiler.Tests/TestCases/Pretty/DelegateConstruction.cs

@ -631,21 +631,13 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction @@ -631,21 +631,13 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction
Action action = delegate {
list.Select((int x) => x * 2);
};
#if OPT && ROSLYN
Action obj = delegate {
#else
Action action2 = delegate {
#endif
list.Select((int x) => x * 2);
};
Console.WriteLine();
action();
Console.WriteLine();
#if OPT && ROSLYN
obj();
#else
action2();
#endif
}
catch (Exception)
{

2
ICSharpCode.Decompiler/IL/ILTypeExtensions.cs

@ -238,6 +238,8 @@ namespace ICSharpCode.Decompiler.IL @@ -238,6 +238,8 @@ namespace ICSharpCode.Decompiler.IL
default:
return SpecialType.UnknownType;
}
case ILFunction func when func.DelegateType != null:
return func.DelegateType;
default:
return SpecialType.UnknownType;
}

Loading…
Cancel
Save