[vala] Warn when using deprecated # modifier or operator
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Subject: [vala] Warn when using deprecated # modifier or operator
- Date: Wed, 15 Apr 2009 15:09:40 -0400 (EDT)
commit b4a72c1cb1effb87c5ed7118b5de9e1e20e4ebe8
Author: Jürg Billeter <j bitron ch>
Date: Wed Apr 15 21:08:29 2009 +0200
Warn when using deprecated # modifier or operator
---
vala/valaparser.vala | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/vala/valaparser.vala b/vala/valaparser.vala
index ba28b62..5e7d92c 100644
--- a/vala/valaparser.vala
+++ b/vala/valaparser.vala
@@ -460,8 +460,9 @@ public class Vala.Parser : CodeVisitor {
if (!owned_by_default) {
if (accept (TokenType.HASH)) {
- // TODO enable warning after releasing Vala 0.5.5
- // Report.warning (get_last_src (), "deprecated syntax, use `owned` modifier");
+ if (!context.deprecated) {
+ Report.warning (get_last_src (), "deprecated syntax, use `owned` modifier");
+ }
value_owned = true;
}
}
@@ -834,8 +835,9 @@ public class Vala.Parser : CodeVisitor {
}
switch (current ()) {
case TokenType.HASH:
- // TODO enable warning after releasing Vala 0.5.5
- // Report.warning (get_last_src (), "deprecated syntax, use `(owned)` cast");
+ if (!context.deprecated) {
+ Report.warning (get_last_src (), "deprecated syntax, use `(owned)` cast");
+ }
next ();
var op = parse_unary_expression ();
return new ReferenceTransferExpression (op, get_src (begin));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]