Re: [Vala] class definitions



Hi,

On Wed, 2008-10-15 at 22:05 +0400, Кутейников Дмитрий wrote: 
I wrote this:

class Item
        {
                public uint8 x, y, zlevel;
                public string location;
        }


and got an error:

objects.vala:18.19-18.19: error: syntax error, expected declaration
                                public uint8 x, y, zlevel;


This code is correct:

class Item
        {
                public uint8 x;
                public uint8 y;
                 public uint8 zlevel;
                public string location;
        }

So I cannot define fields with the same type in one line? Is it a bug?

It's more an additional feature[1] that isn't fully supported yet.

Hans

[1] http://bugzilla.gnome.org/show_bug.cgi?id=530030





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