[Vala] class definitions



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?




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