Browse Source

Add pretty tests for dynamic in loop conditions and conditional calls

dynamic used as a while-loop condition and the null-conditional
invocation operator on a dynamic receiver were not covered.

Assisted-by: Claude:claude-fable-5:Claude Code
pull/3857/head
Siegfried Pammer 3 days ago committed by Siegfried Pammer
parent
commit
069e0a6ec6
  1. 15
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/DynamicTests.cs

15
ICSharpCode.Decompiler.Tests/TestCases/Pretty/DynamicTests.cs

@ -576,6 +576,21 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
return ref o; return ref o;
} }
#endif #endif
private static void WhileDynamic(dynamic a)
{
while (a)
{
Console.WriteLine("x");
}
}
#if CS60
private static void NullConditionalInvocation(dynamic a)
{
a?.Call();
}
#endif
} }
internal static class Extension internal static class Extension

Loading…
Cancel
Save