diff --git a/AltCover.Engine/Visitor.fs b/AltCover.Engine/Visitor.fs index c98a2e570..09b900351 100644 --- a/AltCover.Engine/Visitor.fs +++ b/AltCover.Engine/Visitor.fs @@ -1336,6 +1336,8 @@ module internal Visitor = before.OpCode = OpCodes.Ldloc_0 && sp.IsNotNull && sp.IsHidden + && (let v0t = dbg.Method.Body.Variables.[0].VariableType + v0t.MetadataType = MetadataType.Int32) // state machines do this [ rawInstructions |> Seq.cast ] |> Seq.filter (fun _ -> dbg.IsNotNull)