summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/Parser.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2017-02-10 12:59:45 +0100
committerJose <jose@zeroc.com>2017-02-10 12:59:45 +0100
commite9ff04cb3f82eed72e325f7c51b42e56a9b1daba (patch)
tree62990984c0e933e348390728f9970bc63127b27f /cpp/src/Slice/Parser.cpp
parentFixed (ICE-7540) - IceGridGUI discovers unreachable locators (diff)
downloadice-e9ff04cb3f82eed72e325f7c51b42e56a9b1daba.tar.bz2
ice-e9ff04cb3f82eed72e325f7c51b42e56a9b1daba.tar.xz
ice-e9ff04cb3f82eed72e325f7c51b42e56a9b1daba.zip
Emit deprecated warnings for classes implementing interfaces
Diffstat (limited to 'cpp/src/Slice/Parser.cpp')
-rw-r--r--cpp/src/Slice/Parser.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp
index de6ad85bb96..ca774ef54a8 100644
--- a/cpp/src/Slice/Parser.cpp
+++ b/cpp/src/Slice/Parser.cpp
@@ -3954,6 +3954,17 @@ Slice::ClassDef::ClassDef(const ContainerPtr& container, const string& name, int
_local(local),
_compactId(id)
{
+ if(!local && !intf)
+ {
+ for(ClassList::const_iterator p = _bases.begin(); p != _bases.end(); ++p)
+ {
+ if((*p)->isInterface())
+ {
+ _unit->warning(Deprecated, "classes implementing interfaces are deprecated");
+ break;
+ }
+ }
+ }
//
// First element of bases may be a class, all others must be
// interfaces.