GNOME Bugzilla – Bug 627093
error with a dynamic array in a public struct
Last modified: 2010-09-09 17:03:54 UTC
Compile this program: public struct MyStruct { public int[] array; } int main () { MyStruct test = MyStruct (); test.array += 1; test.array += 2; stdout.printf ("%d\n", test.array[1]); return 0; } And you will get this GCC error: error: ‘MyStruct’ has no member named ‘_array_size_’ If I declare MyStruct without the "public" keyword, everything works fine.
confirmed with vala 0.9.5-22-gaef8d07 (test case added to vala-tests)
commit 89c0afc73b3d0d9aa34403f831361610c1bddf45 Author: Jürg Billeter <j@bitron.ch> Date: Thu Sep 9 17:58:10 2010 +0200 codegen: Report error on unsupported use of array concatenation
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of bug 570821 ***