diff --git a/AltCover.Engine/Visitor.fs b/AltCover.Engine/Visitor.fs index 09b900351..ab2a7071b 100644 --- a/AltCover.Engine/Visitor.fs +++ b/AltCover.Engine/Visitor.fs @@ -1220,8 +1220,10 @@ module internal Visitor = lastOfSequencePoint dbg n let rec internal firstOfSequencePoint (dbg: MethodDebugInformation) (i: Instruction) = - if (i |> dbg.GetSequencePoint).IsNotNull then i - else firstOfSequencePoint dbg i.Previous + if (i |> dbg.GetSequencePoint).IsNotNull then + i + else + firstOfSequencePoint dbg i.Previous let internal getJumps (dbg: MethodDebugInformation) (i: Instruction) = let terminal = lastOfSequencePoint dbg i @@ -1336,7 +1338,9 @@ module internal Visitor = before.OpCode = OpCodes.Ldloc_0 && sp.IsNotNull && sp.IsHidden - && (let v0t = dbg.Method.Body.Variables.[0].VariableType + && (let v0t = + dbg.Method.Body.Variables.[0].VariableType + v0t.MetadataType = MetadataType.Int32) // state machines do this [ rawInstructions |> Seq.cast ] @@ -1523,4 +1527,11 @@ module internal Visitor = | Some dict -> match dict.TryGetValue file with | (true, url) -> url - | _ -> I.locateMatch file dict \ No newline at end of file + | _ -> I.locateMatch file dict + +[] +() \ No newline at end of file