Static enums in Vala?

21 views Asked by At

I have this snippet:

public class Item : Object, ContentItem {
    public static enum State {
        STOPPED,
        RUNNING,
        PAUSED
    }
    ...
}

and I get:

error: syntax error, expected `enum'
   24 |     public static enum State {
      |            ^~~~~~             

Is there a way to get class static enums? Obviously it wouldn't make sense to have something like enums copied for every instance of Item.

0

There are 0 answers