[Vala] Bug: Implementing properties in vala Interfaces fails with Genie



Testcase:

ITest.vala:
----------------------------------------------------------------------------
namespace Testns {

public interface ITest : GLib.Object {
    public abstract bool b_prop { get; set; }
    public abstract int    i_prop { get; set; }
    public abstract double d_prop { get; set; }
}
}
----------------------------------------------------------------------------

Test.gs:
----------------------------------------------------------------------------
namespace Testns
        class TestImpl : GLib.Object implements ITest
                prop override b_prop : bool
                prop override i_prop : int
                prop override d_prop : double
----------------------------------------------------------------------------

$ valac ITest.vala Test.gs -o Test
Test.gs:3.3-3.29: error: Type and/or accessors of overriding property
`Testns.TestImpl.b_prop' do not match overridden property
`Testns.ITest.b_prop'.
                prop override b_prop : bool
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Test.gs:3.3-3.29: error: Testns.TestImpl.b_prop: no suitable property
found to override
                prop override b_prop : bool
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Test.gs:4.3-4.28: error: Type and/or accessors of overriding property
`Testns.TestImpl.i_prop' do not match overridden property
`Testns.ITest.i_prop'.
                prop override i_prop : int
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
Test.gs:4.3-4.28: error: Testns.TestImpl.i_prop: no suitable property
found to override
                prop override i_prop : int
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
Test.gs:5.3-5.31: error: Type and/or accessors of overriding property
`Testns.TestImpl.d_prop' do not match overridden property
`Testns.ITest.d_prop'.
                prop override d_prop : double
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Test.gs:5.3-5.31: error: Testns.TestImpl.d_prop: no suitable property
found to override
                prop override d_prop : double
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Compilation failed: 6 error(s), 0 warning(s)

Sincerely,
Hans



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]