GNOME Bugzilla – Bug 596637
Postfix operator "++" does not work on array members
Last modified: 2009-09-29 20:20:14 UTC
Reported by Jim Nelson <jim@yorba.org> on the Vala mailing list, see the message at http://article.gmane.org/gmane.comp.programming.vala/4245 I have confirmed it. The following simple program demonstrates the problem: namespace Test { public static int main(string[] args) { int[] a = new int[3]; int current = 0; a[current] = 0; (a[current])++; return(a[current]); } } The result is: mbt@zest:~/test/vala$ valac test_array.vala test_array.vala:7.5-7.18: error: unsupported lvalue in postfix expression (a[current])++; ^^^^^^^^^^^^^^ Compilation failed: 1 error(s), 0 warning(s) This problem is found in Vala 0.7.7. Likewise, it seems the prefix "++" does not work either.
commit 99ec168d1042c9baa38819805edaadfda2646cd2 Author: Jürg Billeter <j@bitron.ch> Date: Tue Sep 29 22:19:18 2009 +0200 Support postfix operator on array members Fixes bug 596637.