summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/Parser.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2015-07-23 10:07:27 -0230
committerDwayne Boone <dwayne@zeroc.com>2015-07-23 10:07:27 -0230
commit367289154f5a51fe083ddb9065fac93a648f8d8a (patch)
treea152a72b4c48d0d98c571bf918891a731b2c597a /cpp/src/Slice/Parser.cpp
parentAdd VC140 to CPP_COMPILER supported values (diff)
downloadice-367289154f5a51fe083ddb9065fac93a648f8d8a.tar.bz2
ice-367289154f5a51fe083ddb9065fac93a648f8d8a.tar.xz
ice-367289154f5a51fe083ddb9065fac93a648f8d8a.zip
Minor code refactor of the ICE-6645 fix
Diffstat (limited to 'cpp/src/Slice/Parser.cpp')
-rw-r--r--cpp/src/Slice/Parser.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp
index fdfbffba453..044bae97179 100644
--- a/cpp/src/Slice/Parser.cpp
+++ b/cpp/src/Slice/Parser.cpp
@@ -1304,7 +1304,7 @@ Slice::Container::lookupTypeNoBuiltin(const string& scoped, bool printError)
ContainedPtr contained = ContainedPtr::dynamicCast(this);
if(contained)
{
- if (typeError)
+ if(typeError)
{
ignoreUndefined = true;
}
@@ -1322,23 +1322,19 @@ Slice::Container::lookupTypeNoBuiltin(const string& scoped, bool printError)
}
return TypeList();
}
- if(typeError && results.empty() && printError)
- {
- for(vector<string>::const_iterator p = errors.begin(); p != errors.end(); ++p)
- {
- _unit->error(*p);
- }
- }
- return results;
}
- else
+
+ //
+ // Do not emit errors if there was a type error but a match was found in a higher scope.
+ //
+ if(printError && !(typeError && !results.empty()))
{
for(vector<string>::const_iterator p = errors.begin(); p != errors.end(); ++p)
{
_unit->error(*p);
}
- return results;
}
+ return results;
}
ContainedList