edje: detect when we try to inherit from ourself.
authorcedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 23 Jan 2012 15:45:12 +0000 (15:45 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 23 Jan 2012 15:45:12 +0000 (15:45 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@67472 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/bin/edje_cc_handlers.c

index f74fa12..5244f6a 100644 (file)
@@ -2242,6 +2242,14 @@ st_collections_group_inherit(void)
             progname, file_in, line - 1, parent_name);
         exit(-1);
      }
+   if (pc2 == pc)
+     {
+        ERR("%s: Error. parse error %s:%i. You are trying to inherit '%s' from itself. That's not possible."
+            "If there is another group of the same name, you want to inherit from that group and have the"
+            "same name as that group, there is a trick ! Just put the inherit before the directive that set"
+            "the name !", progname, file_in, line - 1, parent_name);
+        exit(-1);
+     }
 
    if (pc2->data)
      {