Skip to content

Commit f006ea4

Browse files
committed
use patch func
1 parent ec784bf commit f006ea4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

optimizer/fold.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ func (fold *fold) Exit(node *Node) {
2020
// for IntegerNode the type may have been changed from int->float
2121
// preserve this information by setting the type after the Patch
2222
patchWithType := func(newNode Node, leafType reflect.Type) {
23-
fold.applied = true
24-
Patch(node, newNode)
23+
patch(newNode)
2524
newNode.SetType(leafType)
2625
}
2726

0 commit comments

Comments
 (0)