[vala/0.10] codegen: Report error on unsupported use of array concatenation
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.10] codegen: Report error on unsupported use of array concatenation
- Date: Wed, 15 Sep 2010 21:06:50 +0000 (UTC)
commit 7b38eb20dcf08c7ddc3fbdd2852b323534ce18d8
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
codegen/valaccodearraymodule.vala | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/codegen/valaccodearraymodule.vala b/codegen/valaccodearraymodule.vala
index 2eebca7..707dc83 100644
--- a/codegen/valaccodearraymodule.vala
+++ b/codegen/valaccodearraymodule.vala
@@ -997,6 +997,15 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule {
ccall.add_argument (handle_struct_argument (value_param, element, (CCodeExpression) element.ccodenode));
assignment.ccodenode = ccall;
+
+ var array_var = assignment.left.symbol_reference;
+ var array_local = array_var as LocalVariable;
+ if (array_type.rank == 1 && array_var != null && array_var.is_internal_symbol ()
+ && ((array_var is LocalVariable && !array_local.captured) || array_var is Field)) {
+ // valid array add
+ } else {
+ Report.error (assignment.source_reference, "Array concatenation not supported for public array variables");
+ }
}
public override void generate_parameter (FormalParameter param, CCodeDeclarationSpace decl_space, Map<int,CCodeFormalParameter> cparam_map, Map<int,CCodeExpression>? carg_map) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]