summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2019-12-04 16:04:19 +0100
committerDaniel Kolesa <d.kolesa@samsung.com>2019-12-04 16:08:10 +0100
commit266f0a57169efe672db44921665a05e73cc0eb58 (patch)
tree4f9cd8da28acd6cbf9875204f3e62627c008d488
parent387947f6b151f5dd65c6c38d99e762e612281269 (diff)
downloadefl-266f0a57169efe672db44921665a05e73cc0eb58.tar.gz
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.
-rw-r--r--src/lib/eolian/eo_parser.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index 706d6c1c37..6c45f19907 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)