[Vala] [Bug?] Access to non-static field are permitted inside static methods
- From: Tal Hadad <tal_hd hotmail com>
- To: Vala Mail List <vala-list gnome org>
- Subject: [Vala] [Bug?] Access to non-static field are permitted inside static methods
- Date: Sun, 27 Nov 2011 00:15:51 +0200
I've noticed now after finding a bug in my program, that access to
non-static field are permitted inside static methods!
I didn't believed no one was noticed this until now...
Here is a code shows the behavior:
class A {
int num = 0;
static void foo () {
if (num == 0)
num++;
}
}
Vala compiles "num" in "foo" into an unsigned _tmp*_.
Hope it was helpful.
Tal
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]