GNOME Bugzilla – Bug 609388
Vala does not allow elements of plain arrays as out parameters
Last modified: 2010-02-10 10:02:22 UTC
Vala fails to compile the next test case: [test.vala] void modify(out int n) { n = 5; } void main() { int[] a = new int[3]; for(int i=0; i<a.length; i++) modify(out a[i]); } [/test.vala] $ valac test.vala test.vala:8.10-8.17: error: ref and out method arguments can only be used with fields, parameters, and local variables modify(out a[i]); ^^^^^^^^ Compilation failed: 1 error(s), 0 warning(s)
commit b7a5be2f5a2b1d2c4ab03d6e74251f41c53ce893 Author: Jürg Billeter <j@bitron.ch> Date: Wed Feb 10 10:59:51 2010 +0100 Allow using array element access as ref and out method arguments Fixes bug 609388.