+static void
+check_vararg(Class *c)
+{
+ GList *l;
+ for(l=c->nodes;l;l=g_list_next(l)) {
+ Node *n = l->data;
+ if(n->type == METHOD_NODE) {
+ Method *m = (Method *)n;
+ if(!m->vararg)
+ continue;
+ if(m->scope == OVERRIDE_METHOD ||
+ m->scope == SIGNAL_LAST_METHOD ||
+ m->scope == SIGNAL_FIRST_METHOD ||
+ m->scope == VIRTUAL_METHOD) {
+ print_error(FALSE,
+ "signals, overrides and virtuals, "
+ "can't have variable argument "
+ "lists",
+ m->line_no);
+ }
+ }
+ }
+}
+