Re: [Vala] default value is less accessible than method



On Tuesday, 10 October 2017, 20:11:15 BST, Ondrej Tuma <konference webjet cz> wrote: 
I have simple code (in attachment), when I try to compile, i got error:

GLib.Object.vala:15.39-15.52:
error: default value is less accessible than method `Node.add'
     public Node add (uint direction = Direction.AUTO) {
                                      ^^^^^^^^^^^^^^
Compilation failed: 1 error(s), 0 warning(s)

What's wrong?

 You want:
public enum Direction {    LEFT,    RIGHT,    AUTO}
instead of:
enum Direction {    LEFT,    RIGHT,    AUTO}
Without an explicit access modifier the default is 'internal'.


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