From: Rico Tzschichholz Date: Sun, 3 Sep 2017 17:48:31 +0000 (+0200) Subject: codegen: Deprecate implicit copy of arrays, use explicit copy method X-Git-Tag: 0.41.90~226 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae4c2cbc3c51f2e98f62cc9b48e0d8a18bd47092;p=thirdparty%2Fvala.git codegen: Deprecate implicit copy of arrays, use explicit copy method https://bugzilla.gnome.org/show_bug.cgi?id=650663 --- diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala index 9f02b8c77..3de943864 100644 --- a/codegen/valaccodebasemodule.vala +++ b/codegen/valaccodebasemodule.vala @@ -5876,6 +5876,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;