[Vala] more bugs when signaling..



I have found another bug in valac when parsing a signal definition
inside a conditional clause. The compiler stops erroring: 

  main.vala:9.3-9.8: error: Return not allowed in this context

The code for playing is:

-----------------------
using GLib;

public class Main.Main : Object {
        public static int main(string[] args) {
                if (args.length == 1) {
                        Object o = new Object();
                        o.notify += btn => { };
                }
                return 0;
        }
}
-----------------------

If the 'o.notify+=btn=>{};' line is commented the program compiles fine.

Looks like a bug in the grammar file. Sorry I don't know much about
bison/yacc can't help here.


--pancake



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