From 601f112d8e418c10ffde7f7a9744ab1d4eccdd98 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 24 Apr 2014 13:42:07 +0200 Subject: Fix bug in recursive polymorphic parsing --- xsde/cxx/hybrid/tree-size-processor.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'xsde/cxx/hybrid/tree-size-processor.cxx') diff --git a/xsde/cxx/hybrid/tree-size-processor.cxx b/xsde/cxx/hybrid/tree-size-processor.cxx index 0470884..4f1939e 100644 --- a/xsde/cxx/hybrid/tree-size-processor.cxx +++ b/xsde/cxx/hybrid/tree-size-processor.cxx @@ -363,6 +363,14 @@ namespace CXX dispatch (b); fixed = get (b); + + // If our base is polymorphic and recursive, then we + // are also automatically recursive, since we can be + // substiuted for the base. + // + if (b.context ().count ("polymorphic") && + b.context ().count ("recursive")) + ctx.set ("recursive", true); } // Check particles. Do this even if fixed is already false -- cgit v1.1