On a tiny program, Vala warns that a constructor is unused when in fact it gets called:

== hello.vala ==
class Foo {
   Foo() {
       stdout.puts("construct\n");
   }
void hello() {
       stdout.puts("hello\n");
   }
static int main(string[] args) {
       Foo f = new Foo();
       f.hello();
       return 0;
   }
}
==========

$ valac hello.vala
hello.vala:2.2-2.4: warning: method `Foo.new' never used
   Foo() {
   ^^^
Compilation succeeded - 1 warning(s)
$ ./hello
construct
hello
$

This is a bug, and I should report it in Bugzilla... right?

adam

_______________________________________________
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to