vala r1224 - in trunk: . vala



Author: juergbi
Date: Mon Apr 14 18:48:59 2008
New Revision: 1224
URL: http://svn.gnome.org/viewvc/vala?rev=1224&view=rev

Log:
2008-04-14  Juerg Billeter  <j bitron ch>

	* vala/valaparser.vala: report warning when using weak type
	  modifier in cast expressions, fixes bug 527990


Modified:
   trunk/ChangeLog
   trunk/vala/valaparser.vala

Modified: trunk/vala/valaparser.vala
==============================================================================
--- trunk/vala/valaparser.vala	(original)
+++ trunk/vala/valaparser.vala	Mon Apr 14 18:48:59 2008
@@ -728,6 +728,7 @@
 			next ();
 			switch (current ()) {
 			case TokenType.VOID:
+			case TokenType.WEAK:
 			case TokenType.IDENTIFIER:
 				var type = parse_type ();
 				if (accept (TokenType.CLOSE_PARENS)) {
@@ -749,6 +750,10 @@
 					case TokenType.SIZEOF:
 					case TokenType.TYPEOF:
 					case TokenType.IDENTIFIER:
+						var ut = type as UnresolvedType;
+						if (ut != null && ut.is_weak) {
+							Report.warning (get_src (begin), "obsolete syntax, weak type modifier unused in cast expressions");
+						}
 						var inner = parse_unary_expression ();
 						return context.create_cast_expression (inner, type, get_src (begin), false);
 					}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]