[vala/staging: 4/4] codegen: Deprecate implicit copy of arrays, use explicit copy method



commit ea861ffb936b2883d0c93baeea05be85763e6169
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 |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index fb63d43..bfddbf5 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -5846,6 +5846,9 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                                return result;
                        }
                        result = copy;
+                       if (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]