From 8c99975ac40a4f0da5518e058d293fec850ca225 Mon Sep 17 00:00:00 2001 From: qiuyesuifeng Date: Sat, 7 Nov 2015 16:57:10 +0800 Subject: [PATCH] *: fix mybatis test error. --- ast/functions.go | 4 ++-- expression/visitor.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ast/functions.go b/ast/functions.go index 7faab4c6e1..1fb30a4a64 100644 --- a/ast/functions.go +++ b/ast/functions.go @@ -375,11 +375,11 @@ func (n *FuncDateArithExpr) Accept(v Visitor) (Node, bool) { n.Date = node.(ExprNode) } if n.Interval != nil { - node, ok := n.Date.Accept(v) + node, ok := n.Interval.Accept(v) if !ok { return n, false } - n.Date = node.(ExprNode) + n.Interval = node.(ExprNode) } return v.Leave(n) } diff --git a/expression/visitor.go b/expression/visitor.go index 6646d59db7..80c5ab46d9 100644 --- a/expression/visitor.go +++ b/expression/visitor.go @@ -108,7 +108,7 @@ type Visitor interface { VisitFunctionTrim(v *FunctionTrim) (Expression, error) // VisitDateArith visits DateArith expression. - VisitDateArith(dc *DateArith) (Expression, error) + VisitDateArith(da *DateArith) (Expression, error) } // BaseVisitor is the base implementation of Visitor.