[vala/wip/x-version: 19/24] Deprecate [Deprecated] and [Experimental]
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [vala/wip/x-version: 19/24] Deprecate [Deprecated] and [Experimental]
- Date: Thu, 25 Dec 2014 20:53:04 +0000 (UTC)
commit f21a4fcbc1eca90333217f3a16889fbbe5cb349a
Author: Florian Brosch <flo brosch gmail com>
Date:   Thu Jul 10 04:41:01 2014 +0200
    Deprecate [Deprecated] and [Experimental]
 vala/valaattribute.vala |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/vala/valaattribute.vala b/vala/valaattribute.vala
index a3ce48b..dd5cc0a 100644
--- a/vala/valaattribute.vala
+++ b/vala/valaattribute.vala
@@ -46,6 +46,14 @@ public class Vala.Attribute : CodeNode {
        public Attribute (string name, SourceReference? source_reference = null) {
                this.name = name;
                this.source_reference = source_reference;
+
+               if (!CodeContext.get ().deprecated) {
+                       if (name == "Deprecated") {
+                               Report.deprecated (source_reference, "[Deprecated] is deprecated. Use 
[Version (deprecated = true, deprecated_since = \"\", replacement = \"\")]");
+                       } else if (name == "Experimental") {
+                               Report.deprecated (source_reference, "[Experimental] is deprecated. Use 
[Version (experimental = true, experimental_until = \"\")]");
+                       }
+               }
        }
 
        /**
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]