/* valaparser.vala
*
- * Copyright (C) 2006-2011 Jürg Billeter
+ * Copyright (C) 2006-2013 Jürg Billeter
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
void parse_local_constant_declarations (Block block) throws ParseError {
expect (TokenType.CONST);
var constant_type = parse_type (false, false);
+
+ // constant arrays don't own their element
+ var array_type = constant_type as ArrayType;
+ if (array_type != null) {
+ array_type.element_type.value_owned = false;
+ }
+
do {
DataType type_copy = constant_type.copy ();
var local = parse_local_constant (type_copy);