[vala/x-version: 19/22] Deprecate [Deprecated] and [Experimental]
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/x-version: 19/22] Deprecate [Deprecated] and [Experimental]
- Date: Sat, 19 Jul 2014 11:18:58 +0000 (UTC)
commit fbdae5bc98df858ac7537e58ad1c37bfd20b36d6
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]