Skip to content

Commit

Permalink
fix for incorrect assignments
Browse files Browse the repository at this point in the history
  • Loading branch information
sonalmahajan15 committed Dec 12, 2023
1 parent 0758b59 commit 06d3eb8
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions assertion/function/assertiontree/backprop.go
Original file line number Diff line number Diff line change
Expand Up @@ -622,19 +622,13 @@ buildShadowMask:

// beforeTriggersLastIndex is used to find the newly added triggers on the next line
beforeTriggersLastIndex := len(rootNode.triggers)
if beforeTriggersLastIndex > 0 {
beforeTriggersLastIndex--
}

rootNode.AddProduction(&annotation.ProduceTrigger{
Annotation: rproducers[0].GetShallow().Annotation,
Expr: lhsVal,
}, rproducers[0].GetDeepSlice()...)

// Update consumers of newly added triggers with assignment entries for informative printing of errors
if len(rootNode.triggers) == 0 {
continue
}
for _, t := range rootNode.triggers[beforeTriggersLastIndex:len(rootNode.triggers)] {
t.Consumer.Annotation.AddAssignment(annotation.Assignment{
LHSExprStr: util.ExprToString(lhsVal, rootNode.Pass()),
Expand Down

0 comments on commit 06d3eb8

Please sign in to comment.