Skip to content

Commit

Permalink
Fixed use of append(). It needs to reassign the container after appen…
Browse files Browse the repository at this point in the history
…d in case of reallocation.
  • Loading branch information
koden-km committed Nov 17, 2014
1 parent c1d046b commit 461b0f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dialekt/ast/abstractpolyadicexpression.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func NewAbstractPolyadicOperator(children ...ExpressionInterface) *AbstractPolya

// Add a child expression to this operator.
func (po *AbstractPolyadicExpression) Add(expression ExpressionInterface) {
append(po.children, expression)
po.children = append(po.children, expression)
}

// Fetch a slice of this operator's children.
Expand Down
2 changes: 1 addition & 1 deletion dialekt/ast/pattern.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func NewPattern(children ...PatternChildInterface) *Pattern {

// Add a child to this node.
func (pat *Pattern) Add(child PatternChildInterface) {
append(pat.children, child)
pat.children = append(pat.children, child)
}

// Fetch a slice of this node's children.
Expand Down

0 comments on commit 461b0f7

Please sign in to comment.