From 4c408a85759eb42b6b84b8cdab81453df31cd289 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 15 Dec 2011 13:09:25 +0200 Subject: Register substituting anonymous types with polymorphic maps --- xsd/cxx/tree/stream-source.cxx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'xsd/cxx/tree/stream-source.cxx') diff --git a/xsd/cxx/tree/stream-source.cxx b/xsd/cxx/tree/stream-source.cxx index 7c4954c..1d4b5d9 100644 --- a/xsd/cxx/tree/stream-source.cxx +++ b/xsd/cxx/tree/stream-source.cxx @@ -52,7 +52,9 @@ namespace CXX // Register with ostream map. // - if (polymorphic && polymorphic_p (l) && !anonymous_p (l)) + if (polymorphic && + polymorphic_p (l) && + (!anonymous_p (l) || anonymous_substitutes_p (l))) { // Note that we are using the original type name. // @@ -107,7 +109,9 @@ namespace CXX // Register with ostream map. // - if (polymorphic && polymorphic_p (u) && !anonymous_p (u)) + if (polymorphic && + polymorphic_p (u) && + (!anonymous_p (u) || anonymous_substitutes_p (u))) { // Note that we are using the original type name. // @@ -185,7 +189,9 @@ namespace CXX // Register with ostream map. // - if (polymorphic && polymorphic_p (e) && !anonymous_p (e)) + if (polymorphic && + polymorphic_p (e) && + (!anonymous_p (e) || anonymous_substitutes_p (e))) { // Note that we are using the original type name. // @@ -380,7 +386,9 @@ namespace CXX // Register with ostream map. // - if (polymorphic && polymorphic_p (c) && !anonymous_p (c)) + if (polymorphic && + polymorphic_p (c) && + (!anonymous_p (c) || anonymous_substitutes_p (c))) { // Note that we are using the original type name. // -- cgit v1.1