[Vala] bug? vala compiler problem on Defining new Type from other



Is this a bug?
The documentation seems clear, but the compiler disagrees.

The simplified program:
using Gee;
using GLib;

public struct test : uint32 {}


void main()
{
}

The compilation command:
...$ valac --pkg gee-1.0 test.vala

The error messages:
.../test.vala.c: In function ‘test_get_type’:
.../test.vala.c:19:76: error: ‘test_dup’ undeclared (first use in this function) .../test.vala.c:19:76: note: each undeclared identifier is reported only once for each function it appears in .../test.vala.c:19:103: error: ‘test_free’ undeclared (first use in this function)
error: cc exited with status 256
Compilation failed: 1 error(s), 0 warning(s)

Adding [SimpleType] and changing the type to uint didn't fix the problem.



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