compiler/libec: Fixed bad casts causing warnings on classes derived from Array
authorJerome St-Louis <jerome@ecere.com>
Wed, 20 Apr 2016 21:48:32 +0000 (17:48 -0400)
committerJerome St-Louis <jerome@ecere.com>
Fri, 29 Apr 2016 16:27:14 +0000 (12:27 -0400)
compiler/libec/src/pass15.ec
compiler/libec/src/pass2.ec

index cc4aaef..95a3d1e 100644 (file)
@@ -12389,6 +12389,7 @@ static void ProcessStatement(Statement stmt)
             Symbol symbol;
             Expression expIt = null;
             bool isMap = false, isArray = false, isLinkList = false, isList = false, isCustomAVLTree = false; //, isAVLTree = false;
+            // TODO: Find these once on loadup
             Class arrayClass = eSystem_FindClass(privateModule, "Array");
             Class linkListClass = eSystem_FindClass(privateModule, "LinkList");
             Class customAVLTreeClass = eSystem_FindClass(privateModule, "CustomAVLTree");
index b8b1ad9..ccb9efc 100644 (file)
@@ -590,7 +590,9 @@ static void ProcessExpression(Expression exp)
                memberExp.index.exp.expType._class.registered != containerClass && eClass_IsDerived(memberExp.index.exp.expType._class.registered, containerClass))
             {
                Class c = memberExp.index.exp.expType._class.registered;
-               if(strcmp((c.templateClass ? c.templateClass : c).name, "Array"))
+               // TODO: Find these once on loadup
+               Class arrayClass = eSystem_FindClass(privateModule, "Array");
+               if(!eClass_IsDerived(c.templateClass ? c.templateClass : c, arrayClass))
                {
                   if(exp.op.exp2 && exp.op.op == '=')
                   {