summaryrefslogtreecommitdiffstats
path: root/generator.cpp
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2010-02-03 14:39:38 -0200
committerMarcelo Lira <marcelo.lira@openbossa.org>2010-02-24 17:35:24 -0300
commit2f0a8f07a9412441d34098c26cf4360d6246e0b5 (patch)
treed7e9caea5eaf4097ee3f2717df31dcd4d6446632 /generator.cpp
parent593804998aaa1d463b06bb5db6ef467aed23c272 (diff)
downloadgeneratorrunner-2f0a8f07a9412441d34098c26cf4360d6246e0b5.tar.gz
generatorrunner-2f0a8f07a9412441d34098c26cf4360d6246e0b5.tar.xz
generatorrunner-2f0a8f07a9412441d34098c26cf4360d6246e0b5.zip
Avoid get the wrong class when using Generator::implicitConversions(const TypeEntry*) when there are
two classes with the same name, but in different scopes.
Diffstat (limited to 'generator.cpp')
-rw-r--r--generator.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/generator.cpp b/generator.cpp
index 0f91a0e..69828ba 100644
--- a/generator.cpp
+++ b/generator.cpp
@@ -390,13 +390,12 @@ CodeSnipList Generator::getCodeSnips(const AbstractMetaFunction *func) const
AbstractMetaFunctionList Generator::implicitConversions(const TypeEntry* type) const
{
- AbstractMetaFunctionList implicits;
if (type->isValue()) {
- const AbstractMetaClass* metaClass = classes().findClass(type->name());
+ const AbstractMetaClass* metaClass = classes().findClass(type);
if (metaClass)
- implicits = metaClass->implicitConversions();
+ return metaClass->implicitConversions();
}
- return implicits;
+ return AbstractMetaFunctionList();
}
AbstractMetaFunctionList Generator::implicitConversions(const AbstractMetaType* metaType) const