From 552f89dce92000c786fd7e46d4e7db3f7098fb18 Mon Sep 17 00:00:00 2001 From: gaschd Date: Wed, 6 Nov 2024 00:50:35 +0100 Subject: [PATCH] AddressOf delegate signatures can accept classes implementing the parameter interface as compatible parameter types --- CodeConverter/Util/FromRoslyn/IMethodSymbolExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CodeConverter/Util/FromRoslyn/IMethodSymbolExtensions.cs b/CodeConverter/Util/FromRoslyn/IMethodSymbolExtensions.cs index 00ac9adf..445d169c 100644 --- a/CodeConverter/Util/FromRoslyn/IMethodSymbolExtensions.cs +++ b/CodeConverter/Util/FromRoslyn/IMethodSymbolExtensions.cs @@ -28,7 +28,7 @@ public static bool CompatibleSignatureToDelegate(this IMethodSymbol method, INam } for (var i = 0; i < method.Parameters.Length; i++) { - if (!invoke.Parameters[i].Type.InheritsFromOrEquals(method.Parameters[i].Type)) { + if (!invoke.Parameters[i].Type.InheritsFromOrEquals(method.Parameters[i].Type, true)) { return false; } }