summaryrefslogtreecommitdiff
path: root/cpp/src/slice2freezej/Main.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2008-02-07 15:48:33 -0330
committerDwayne Boone <dwayne@zeroc.com>2008-02-07 15:48:33 -0330
commit8f2b3d4ce0645c7afeadb96049a005f2d4ee8db2 (patch)
tree26c56a201d8e10e9d5381428e4fe516258eea934 /cpp/src/slice2freezej/Main.cpp
parentVC9 fix (diff)
downloadice-8f2b3d4ce0645c7afeadb96049a005f2d4ee8db2.tar.bz2
ice-8f2b3d4ce0645c7afeadb96049a005f2d4ee8db2.tar.xz
ice-8f2b3d4ce0645c7afeadb96049a005f2d4ee8db2.zip
Bug 2289 - deprecate sequences as dictionary keys
Diffstat (limited to 'cpp/src/slice2freezej/Main.cpp')
-rw-r--r--cpp/src/slice2freezej/Main.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/cpp/src/slice2freezej/Main.cpp b/cpp/src/slice2freezej/Main.cpp
index 4494fe94e0e..e2b312d37ad 100644
--- a/cpp/src/slice2freezej/Main.cpp
+++ b/cpp/src/slice2freezej/Main.cpp
@@ -254,11 +254,16 @@ FreezeGenerator::generate(UnitPtr& u, const Dict& dict)
return false;
}
- if(!Dictionary::legalKeyType(valueType))
+ bool containsSequence;
+ if(!Dictionary::legalKeyType(valueType, containsSequence))
{
cerr << _prog << ": `" << dict.value << "' is not a valid index type" << endl;
return false;
}
+ if(containsSequence)
+ {
+ cerr << _prog << ": warning: use of sequences in dictionary keys has been deprecated" << endl;
+ }
if(index.caseSensitive == false)
{
@@ -320,11 +325,16 @@ FreezeGenerator::generate(UnitPtr& u, const Dict& dict)
TypePtr dataMemberType = dataMember->type();
- if(!Dictionary::legalKeyType(dataMemberType))
+ bool containsSequence;
+ if(!Dictionary::legalKeyType(dataMemberType, containsSequence))
{
cerr << _prog << ": `" << index.member << "' cannot be used as an index" << endl;
return false;
}
+ if(containsSequence)
+ {
+ cerr << _prog << ": warning: use of sequences in dictionary keys has been deprecated" << endl;
+ }
if(index.caseSensitive == false)
{