q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=c601944a13d63d2b4228aeca1cd680c5d092e58b

commit c601944a13d63d2b4228aeca1cd680c5d092e58b
Author: Daniel Kolesa <[email protected]>
Date:   Wed Dec 4 16:04:19 2019 +0100

    eolian: fix a parse bug where composites was treated as implements
    
    In the specific case where you had "class A extends B composites C"
    the correct composites branch was ignored and instead the implements
    branch was used. This was entirely wrong/an oversight that did not
    appear until now. Other combinations were handled correctly.
---
 src/lib/eolian/eo_parser.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index 8316c4f3bc..96de7a77ec 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -2301,8 +2301,11 @@ tags_done:
                {
                   /* regular class can have a parent, but just one */
                   _inherit_dep(ls, ibuf, EINA_TRUE);
+                  /* followed by composites */
+                  if (ls->t.kw == KW_composites)
+                    goto noimp_comp;
                   /* if not followed by implements, we're done */
-                  if ((ls->t.kw != KW_implements) && (ls->t.kw != 
KW_composites))
+                  if (ls->t.kw != KW_implements)
                     {
                        eo_lexer_dtor_pop(ls);
                        goto inherit_done;
@@ -2314,6 +2317,7 @@ tags_done:
              while (test_next(ls, ','));
           }
 
+noimp_comp:
         if (ls->t.kw == KW_composites)
           {
              if (type == EOLIAN_CLASS_INTERFACE)

-- 


Reply via email to