-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
Description
Input code
class OptionalArgumentTest
{
static void Test()
{
Test2();
Test3();
Test4();
}
static void Test2(int a = 0) { }
static void Test3(int a = 0, int? b = null) { }
static void Test4(int? b = null, int a = 0) { }
}Erroneous output
internal class OptionalArgumentTest
{
private static void Test()
{
Test2();
Test3(0, null);
Test4(null);
}
private static void Test2(int a = 0)
{
}
private static void Test3(int a = 0, int? b = null)
{
}
private static void Test4(int? b = null, int a = 0)
{
}
}The output compiles but the nullable types do not respect the OptionalArguments decompiler setting. Other parameter types still work. This is a regression, the version I used previously was 90946ae
Details
- Product in use: e.g. ILSpy 9.0 VS extension