[Vala] possible bug in nullable enum
- From: Jan Spurný <JSpurny seznam cz>
- To: vala-list gnome org
- Subject: [Vala] possible bug in nullable enum
- Date: Thu, 16 Jun 2011 17:42:23 +0200 (CEST)
Hi,
it seems to me that there's some sort of bug involved when I declare some enum variable as nullable - this
code:
enum MyEnum { ONE, TWO }
int main(string[] args)
{
MyEnum a = MyEnum.ONE;
if (a == MyEnum.ONE)
stdout.printf("a is one\n");
MyEnum? b = MyEnum.ONE;
if (b == MyEnum.ONE)
stdout.printf("b is one\n");
return 0;
}
prints only "a is one" when "b" is declared as "MyEnum?", but works correctly when declared as a "MyEnum".
Is this a bug or am I doing something wrong?
Regards,
Jan Spurny
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]