[Vala] typeof is return type is not anymore constant... Why?
- From: Marco Trevisan (Treviño) <mail 3v1n0 net>
- To: vala-list gnome org
- Subject: [Vala] typeof is return type is not anymore constant... Why?
- Date: Wed, 23 Feb 2011 19:05:14 +0100
Once was possible to do something like:
const Type t = typeof(string);
Now it's not possible anymore, and I get this error:
/tmp/init.vala:10.17-10.30: error: Value must be constant
const Type t = typeof(string);
^^^^^^^^^^^^^^
Is this a bug or a feature? I was using it to define a const struct
like:
struct MyType {
public string name;
public Type type;
}
const MyType[] types = {{"string_value", typeof(string)},
{"int_value", typeof(int)}};
Now I can't anymore (I have to use an external const value as
workaround).
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]