[Vala] invalid C code generated & a compiler crash
- From: "Matthias Berndt" <Matthias_Berndt gmx de>
- To: vala-list gnome org
- Subject: [Vala] invalid C code generated & a compiler crash
- Date: Tue, 2 Feb 2016 04:59:06 +0100
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]