Skip to content
Snippets Groups Projects
Commit 535f0d0f authored by ilor's avatar ilor
Browse files

fix assertion failure in dyncast (match refactor)

parent 9329c72b
Branches
No related merge requests found
...@@ -20,8 +20,10 @@ ApplyOperator::ApplyOperator( ...@@ -20,8 +20,10 @@ ApplyOperator::ApplyOperator(
void ApplyOperator::execute(const ActionExecContext &context) const void ApplyOperator::execute(const ActionExecContext &context) const
{ {
boost::shared_ptr<MatchVector> matches = MatchVector* matches =
boost::dynamic_pointer_cast<MatchVector>(context.variables()->get_fast(_matches)); dynamic_cast<MatchVector*>(
&context.variables()->get_fast(_matches)->get_value());
BOOST_ASSERT(matches);
context.sentence_context().goto_start(); context.sentence_context().goto_start();
while(context.sentence_context().is_current_inside()) { while(context.sentence_context().is_current_inside()) {
int orig_pos = context.sentence_context().get_position(); int orig_pos = context.sentence_context().get_position();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment