Generated C doesn't compile for static methods in generics
Submitted by Pavel Stupnikov
Link to original bug (#660172)
Description
Even a simple code like this doesn't compile due to reference to undeclared function g_destroy_func
public class Bar<G>
:Object {
public static void test() {
G test;
}
}
/home/dp/t.vala.c: In function ‘bar_test’: /home/dp/t.vala.c:84:2: error: ‘g_destroy_func’ undeclared (first use in this function)
Trying to do something more complex like "new Foo<G>
();" in Bar.test results in even more references to undeclared symbols:
/home/dp/t.vala.c: In function ‘bar_test’: /home/dp/t.vala.c:85:20: error: ‘g_type’ undeclared (first use in this function) /home/dp/t.vala.c:85:45: error: ‘g_dup_func’ undeclared (first use in this function) /home/dp/t.vala.c:85:57: error: ‘g_destroy_func’ undeclared (first use in this function)