From 0e27aa835fce0de83894bd40d01aa48f9de0adf4 Mon Sep 17 00:00:00 2001 From: janusz Date: Sat, 11 Mar 2023 16:04:27 +0000 Subject: [PATCH] Provide instance reference for constructor calls. --- MethodDecorator.Fody/MethodProcessor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MethodDecorator.Fody/MethodProcessor.cs b/MethodDecorator.Fody/MethodProcessor.cs index 2fc4051..91a637a 100644 --- a/MethodDecorator.Fody/MethodProcessor.cs +++ b/MethodDecorator.Fody/MethodProcessor.cs @@ -365,7 +365,7 @@ static IEnumerable GetCallInitInstructions( if (initMethodRef.Parameters.Count > 1) { // then push the instance reference onto the stack - if (memberDefinition.IsConstructor || memberDefinition.IsStatic) + if (memberDefinition.IsStatic) { list.Add(processor.Create(OpCodes.Ldnull)); }