aboutsummaryrefslogtreecommitdiff
path: root/xsd/cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-06-16 11:21:02 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-06-16 11:21:02 +0200
commit4d202fe107036830188ba981e4f4321d2210d6ee (patch)
tree9cdaae444a13bbe57a4db8886b5544fb2c9b102e /xsd/cxx
parentd08c389e751779cd62a649eecb9219ee9037bdb0 (diff)
Handle ID/IDREF templates in inheritance and polymorphism
Diffstat (limited to 'xsd/cxx')
-rw-r--r--xsd/cxx/tree/elements.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/xsd/cxx/tree/elements.cxx b/xsd/cxx/tree/elements.cxx
index d5f03c0..04bff38 100644
--- a/xsd/cxx/tree/elements.cxx
+++ b/xsd/cxx/tree/elements.cxx
@@ -604,6 +604,13 @@ namespace CXX
Boolean Context::
polymorphic_p (SemanticGraph::Type& t)
{
+ // ID/IDREF templates cannot be polymorphic.
+ //
+ if (!t.named_p () &&
+ (t.is_a<SemanticGraph::Fundamental::Id> () ||
+ t.is_a<SemanticGraph::Fundamental::IdRef> ()))
+ return false;
+
if (polymorphic_all)
{
Boolean fund (false);