diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2014-04-24 13:42:07 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2014-04-24 13:42:07 +0200 |
commit | 601f112d8e418c10ffde7f7a9744ab1d4eccdd98 (patch) | |
tree | 1a863e5fcdd25acefe8c641eb3c1e1d10358c645 | |
parent | 55a34e694f6b2c8d45b4a10ce93644fb36c1f7a1 (diff) |
Fix bug in recursive polymorphic parsing
-rw-r--r-- | xsde/cxx/hybrid/parser-source.cxx | 2 | ||||
-rw-r--r-- | xsde/cxx/hybrid/tree-size-processor.cxx | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/xsde/cxx/hybrid/parser-source.cxx b/xsde/cxx/hybrid/parser-source.cxx index 8bfc3c9..ed68c4f 100644 --- a/xsde/cxx/hybrid/parser-source.cxx +++ b/xsde/cxx/hybrid/parser-source.cxx @@ -1614,7 +1614,7 @@ namespace CXX bool rec (recursive (c)); bool validation (!options.suppress_validation () && - !options.suppress_parser_val ()); + !options.suppress_parser_val ()); bool c_string_base (false); if (!stl && hb) 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 |