Page MenuHomePhabricator

eolian_mono: avoid keyword as a variable name
ClosedPublic

Authored by YOhoho on Nov 10 2019, 9:27 PM.

Details

Summary
private static void relation_left_get(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.IEntity child, out Efl.Gfx.IEntity kw_base, out Efl.Gfx.Align relative_position)
{
    Eina.Log.Debug("function efl_ui_relative_container_relation_left_get was called");
    var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
    if (ws != null)
    {
        base = default(Efl.Gfx.IEntity);relative_position = default(Efl.Gfx.Align);

Parameter name is replaced with kw_base but base is not changed in assignment expression (base = default(Efl.Gfx.IEntity...).
This patch will fix following compiler error.

src/bindings/mono/efl_ui_relative_container.eo.cs(544,21): error CS1525: Unexpected symbol `=', expecting `.' or `['
Test Plan

ninja with D10640

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
YOhoho created this revision.Nov 10 2019, 9:27 PM
YOhoho requested review of this revision.Nov 10 2019, 9:27 PM
segfaultxavi added a subscriber: segfaultxavi.EditedNov 11 2019, 1:35 AM

For the record, what was the keyword that was giving you troubles?
Edit: Looking at D10640 I guess it was base.

YOhoho added a comment.EditedNov 11 2019, 5:31 PM

Yes. base means parent class in C#.
Eolian_mono generate .cs code below.

private static void relation_left_get(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.IEntity child, out Efl.Gfx.IEntity kw_base, out Efl.Gfx.Align relative_position)
{
    Eina.Log.Debug("function efl_ui_relative_container_relation_left_get was called");
    var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
    if (ws != null)
    {
        base = default(Efl.Gfx.IEntity);relative_position = default(Efl.Gfx.Align);

Parameter name is replaced with kw_base but base is not changed in assignment expression (base = default(Efl.Gfx.IEntity...).
It occurs compiler error.

src/bindings/mono/efl_ui_relative_container.eo.cs(544,21): error CS1525: Unexpected symbol `=', expecting `.' or `['
YOhoho edited the summary of this revision. (Show Details)Nov 11 2019, 5:33 PM
lauromoura accepted this revision.Nov 12 2019, 5:17 AM
This revision is now accepted and ready to land.Nov 12 2019, 5:17 AM
Closed by commit rEFLa5daa2b72fa7: eolian_mono: avoid keyword as a variable name (authored by Yeongjong Lee <yj34.lee@samsung.com>, committed by lauromoura). · Explain WhyNov 12 2019, 5:31 AM
This revision was automatically updated to reflect the committed changes.