eolina_mono: prevent empty ExtensionMethods class
authorYeongjong Lee <yj34.lee@samsung.com>
Thu, 19 Dec 2019 07:30:48 +0000 (16:30 +0900)
committerJongmin Lee <jm105.lee@samsung.com>
Thu, 19 Dec 2019 21:12:36 +0000 (06:12 +0900)
Test Plan:
Check the code below is removed from `efl_ui_box_stack.eo.cs`.
```
#if EFL_BETA
#pragma warning disable CS1591
public static class CoreUI_UIBoxStack_ExtensionMethods {
}
#pragma warning restore CS1591
#endif
```

Reviewers: lauromoura, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10905

src/bin/eolian_mono/eolian/mono/klass.hh

index a851040..0e99f7e 100644 (file)
@@ -385,6 +385,9 @@ struct klass
          std::copy(c.properties.begin(), c.properties.end(), std::back_inserter(implementable_properties));
      }
 
+     if (implementable_properties.size() == 0 && cls.parts.size() == 0)
+       return true;
+
      if(!as_generator
         (lit("#if EFL_BETA\n")
          << "#pragma warning disable CS1591\n" // Disabling warnings as DocFx will hide these classes