diff generator/abstractmetalang.cpp @ 354:18bd68f586c6

removed superfluous destructors
author Max Samukha <maxter@spambox.com>
date Mon, 24 May 2010 23:43:30 +0300
parents c97e5d15bf95
children 9784459f0750
line wrap: on
line diff
--- a/generator/abstractmetalang.cpp	Fri May 21 14:16:02 2010 +0300
+++ b/generator/abstractmetalang.cpp	Mon May 24 23:43:30 2010 +0300
@@ -1172,7 +1172,7 @@
 {
     return m_force_shell_class ||
         (!isFinal()
-         && (hasVirtualFunctions()
+         && (isPolymorphic()
              || hasProtectedFunctions()
              || hasFieldAccessors()
              || typeEntry()->isObject())); // qtd2 for being more consistent
@@ -1773,7 +1773,10 @@
                         }
 
                         // Set the class which first declares this function, afawk
-                        f->setDeclaringClass(sf->declaringClass());
+                        if (!f->isFinal() && sf->isFinal())
+                            f->setDeclaringClass(f->ownerClass());
+                        else
+                            f->setDeclaringClass(sf->declaringClass());
 
                         if (sf->isFinalInTargetLang() && !sf->isPrivate() && !f->isPrivate() && !sf->isStatic() && !f->isStatic()) {
                             // Shadowed funcion, need to make base class