diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/OptionalArguments.cs b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/OptionalArguments.cs index f76f75183..0f7027c1e 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/OptionalArguments.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/OptionalArguments.cs @@ -308,11 +308,15 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty { } #endif - public static void Issue3469([Optional][DefaultParameterValue(0)] int i, [Optional] DateTime d) + public static void Issue3469a([Optional][DefaultParameterValue(0)] int i, [Optional] DateTime d) { } - #if CS120 + public static Action Issue3469b() + { + return ([Optional][DefaultParameterValue(0)] int i, [Optional] DateTime d) => { + }; + } public static D LambdaWithOptionalParameter() { return (int x = 10) => x; diff --git a/ICSharpCode.Decompiler/TypeSystem/TypeSystemExtensions.cs b/ICSharpCode.Decompiler/TypeSystem/TypeSystemExtensions.cs index 8689fc95f..d4009bb31 100644 --- a/ICSharpCode.Decompiler/TypeSystem/TypeSystemExtensions.cs +++ b/ICSharpCode.Decompiler/TypeSystem/TypeSystemExtensions.cs @@ -629,7 +629,7 @@ namespace ICSharpCode.Decompiler.TypeSystem return false; if (parameter.Owner == null) - return true; + return true; // Shouldn't happen, but we need to check for it. for (int i = parameter.Owner.Parameters.Count - 1; i >= 0; i--) {