[vala/db8c411392f89cf8fc0268d4819f15755d0c4137: 6/9] codegen: Deprecate implicit copy of arrays, use explicit copy method
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/db8c411392f89cf8fc0268d4819f15755d0c4137: 6/9] codegen: Deprecate implicit copy of arrays, use explicit copy method
- Date: Thu, 21 Sep 2017 10:59:53 +0000 (UTC)
commit f8f5eaa2475de662e2af7af33aae8097e9256f45
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sun Sep 3 19:48:31 2017 +0200
codegen: Deprecate implicit copy of arrays, use explicit copy method
https://bugzilla.gnome.org/show_bug.cgi?id=650663
codegen/valaccodebasemodule.vala | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index cd5ae3d..90b84d4 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -5846,6 +5846,13 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
return result;
}
result = copy;
+
+ // implicit array copying is deprecated, but allow it for internal codegen usage
+ var prop_acc = node as PropertyAccessor;
+ if ((prop_acc != null && !prop_acc.automatic_body)
+ && result.value_type is ArrayType) {
+ Report.deprecated (node.source_reference, "implicit copy of array is
deprecated, explicitly invoke the copy method instead");
+ }
}
return result;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]