summaryrefslogtreecommitdiff
path: root/idlc/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-04-03 11:30:06 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-04-03 11:30:06 +0200
commitce2991ee863e2e5faef95462242552515e1cf89c (patch)
treed0a515758e2f031486e5bf9aa2175ad42801cda2 /idlc/source
parent8644d10098a10e02c426a4ae80ce179586f35089 (diff)
Forbid old-style services/singletons inheriting new-style services
...does not make sense. Adapted some old-style services accordingly, where the inherited service had been changed to new-style after the fact. Change-Id: I5f3e4ddf99160778a319062a6c84f83529ff177b
Diffstat (limited to 'idlc/source')
-rw-r--r--idlc/source/parser.y3
1 files changed, 2 insertions, 1 deletions
diff --git a/idlc/source/parser.y b/idlc/source/parser.y
index 8729a63ade7e..e338e57be7aa 100644
--- a/idlc/source/parser.y
+++ b/idlc/source/parser.y
@@ -1707,7 +1707,7 @@ service_export :
pDecl = pScope->lookupByName(*iter);
if ( pDecl && (pDecl->getNodeType() == NT_service) )
{
- if ( pScope->getScopeNodeType() == NT_singleton && pScope->nMembers() > 0 )
+ if ( static_cast< AstService * >(pDecl)->isSingleInterfaceBasedService() || pScope->getScopeNodeType() == NT_singleton && pScope->nMembers() > 0 )
idlc()->error()->error0(EIDL_ILLEGAL_ADD);
else if ( idlc()->error()->checkPublished(pDecl) )
{
@@ -1907,6 +1907,7 @@ service_interface_dfn:
{
AstService * s = static_cast< AstService * >(idlc()->scopes()->top());
if (s != 0) {
+ s->setSingleInterfaceBasedService();
s->setDefaultConstructor(!$4);
}
}