[vala] Fix public array fields with initializers



commit be3769a3e764781fbf78ea6c1ba68ebd9ebcfbcd
Author: Jürg Billeter <j bitron ch>
Date:   Mon Mar 22 23:22:58 2010 +0100

    Fix public array fields with initializers
    
    Fixes bug 609066.

 codegen/valaccodebasemodule.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index cb0cd24..e00f0d3 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -1015,7 +1015,7 @@ internal class Vala.CCodeBaseModule : CCodeModule {
 						instance_init_fragment.append (new CCodeExpressionStatement (new CCodeAssignment (array_len_lhs, (CCodeExpression) size.ccodenode)));
 					}
 
-					if (array_type.rank == 1) {
+					if (array_type.rank == 1 && f.is_internal_symbol ()) {
 						var lhs_array_size = head.get_array_size_cexpression (ma);
 						var rhs_array_len = head.get_array_length_cexpression (ma, 1);
 						instance_init_fragment.append (new CCodeExpressionStatement (new CCodeAssignment (lhs_array_size, rhs_array_len)));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]