vala r1912 - in trunk: . vala



Author: juergbi
Date: Sat Oct 25 07:07:30 2008
New Revision: 1912
URL: http://svn.gnome.org/viewvc/vala?rev=1912&view=rev

Log:
2008-10-25  JÃrg Billeter  <j bitron ch>

	* vala/valaparser.vala:

	Report error when using conflicting method modifiers,
	fixes bug 535853


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

Modified: trunk/vala/valaparser.vala
==============================================================================
--- trunk/vala/valaparser.vala	(original)
+++ trunk/vala/valaparser.vala	Sat Oct 25 07:07:30 2008
@@ -2128,6 +2128,11 @@
 		if (ModifierFlags.OVERRIDE in flags) {
 			method.overrides = true;
 		}
+		if ((method.is_abstract && method.is_virtual)
+		    || (method.is_abstract && method.overrides)
+		    || (method.is_virtual && method.overrides)) {
+			throw new ParseError.SYNTAX (get_error ("only one of `abstract', `virtual', or `override' may be specified"));
+		}
 		if (ModifierFlags.INLINE in flags) {
 			method.is_inline = true;
 		}



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