diff options
author | Nick Zolnierz <nicholas.zolnierz@mongodb.com> | 2019-04-10 16:28:47 -0400 |
---|---|---|
committer | Nick Zolnierz <nicholas.zolnierz@mongodb.com> | 2019-04-10 16:29:07 -0400 |
commit | 50697670712655d8fdd711e7fcdc59328bddb106 (patch) | |
tree | 8fac38a769d0b59602c2d8cf689e1c327889e80c /src/mongo/db/pipeline | |
parent | 3494d897ba249717752aaeb6ab78af0a9ebc14ac (diff) | |
download | mongo-50697670712655d8fdd711e7fcdc59328bddb106.tar.gz |
SERVER-40527 Fix missing virtual in agg_expression_test
Diffstat (limited to 'src/mongo/db/pipeline')
-rw-r--r-- | src/mongo/db/pipeline/expression_test.cpp | 4 | ||||
-rw-r--r-- | src/mongo/db/pipeline/expression_visitor.h | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/db/pipeline/expression_test.cpp b/src/mongo/db/pipeline/expression_test.cpp index 62695188828..5028d870e24 100644 --- a/src/mongo/db/pipeline/expression_test.cpp +++ b/src/mongo/db/pipeline/expression_test.cpp @@ -222,6 +222,10 @@ public: return _isCommutative; } + void acceptVisitor(ExpressionVisitor* visitor) final { + return visitor->visit(this); + } + static intrusive_ptr<Testable> create(bool associative, bool commutative) { return new Testable(associative, commutative); } diff --git a/src/mongo/db/pipeline/expression_visitor.h b/src/mongo/db/pipeline/expression_visitor.h index e049c127c3c..7141547ad54 100644 --- a/src/mongo/db/pipeline/expression_visitor.h +++ b/src/mongo/db/pipeline/expression_visitor.h @@ -31,6 +31,10 @@ #include "mongo/platform/basic.h" +namespace ExpressionTests { +class Testable; +} // namespace ExpressionTests + namespace mongo { class ExpressionConstant; @@ -268,6 +272,7 @@ public: virtual void visit(ExpressionFromAccumulator<AccumulatorStdDevSamp>*) = 0; virtual void visit(ExpressionFromAccumulator<AccumulatorSum>*) = 0; virtual void visit(ExpressionFromAccumulator<AccumulatorMergeObjects>*) = 0; + virtual void visit(ExpressionTests::Testable*) = 0; }; } // namespace mongo |