[Vala] Another question about enums and arrays



Hi,

What is the reason for enumeration values (which can be treated as ints
without a cast) not being allowed where a const int is required?  Surely
enum values are the epitome of const values?

To whit:
int64 arr[AnEnum.SIZE];

results in:
arr2.vala:18.20-18.30: error: Expression of constant integer type expected
  int64 arr[AnEnum.SIZE];
            ^^^^^^^^^^^
Andrew Lees


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