Skip to content

Commit

Permalink
Zero in on state-machine generated branches
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveGilham committed Mar 9, 2022
1 parent 9a1fb35 commit 585b4d0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions AltCover.Engine/Visitor.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 585b4d0

Please sign in to comment.