aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xsd-frontend/semantic-graph/complex.hxx16
1 files changed, 14 insertions, 2 deletions
diff --git a/xsd-frontend/semantic-graph/complex.hxx b/xsd-frontend/semantic-graph/complex.hxx
index e1f08f9..ac47810 100644
--- a/xsd-frontend/semantic-graph/complex.hxx
+++ b/xsd-frontend/semantic-graph/complex.hxx
@@ -18,12 +18,24 @@ namespace XSDFrontend
bool
mixed_p () const
{
- return mixed_;
+ if (mixed_)
+ return true;
+
+ // If we have empty content, then we have the same content
+ // type as our base.
+ //
+ if (!contains_compositor_p () && inherits_p ())
+ {
+ if (Complex* b = dynamic_cast<Complex*> (&inherits ().base ()))
+ return b->mixed_p ();
+ }
+
+ return false;
}
public:
bool
- contains_compositor_p ()
+ contains_compositor_p () const
{
return contains_compositor_ != 0;
}