[Vala] invalid C code generated & a compiler crash



Hi,

The vala compiler generates invalid C code for the following program:

class Aaa<T> {
  public static int main(string[] args) {
    stdout.printf("%s\n", typeof(T).name());
    return 0;
  }
}

Shouldn't it be disallowed to typeof() a type parameter in a static method (or a generic type parametrized 
with a type parameter and so forth)?

And here's another interesting code sample:

class Aaa<T> {
  public class Bbb<U> {
    public signal void x(T t, U u);
  }
}
int main(string[] args) {
  var b = new Aaa<string>.Bbb<string>();
  b.x("foo","bar");
  return 0;
}

This leads to a compiler crash.

Cheers,
Matthias


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