[vala] Report error when using conflicting method modifiers in Genie parser
- From: Jamie McCracken <jamiemcc src gnome org>
- To: svn-commits-list gnome org
- Subject: [vala] Report error when using conflicting method modifiers in Genie parser
- Date: Mon, 13 Apr 2009 17:55:38 -0400 (EDT)
commit 41efbe449e61d9fd892449fa7735457d01646ffb
Author: Jamie McCracken <jamiemcc gnome org>
Date: Mon Apr 13 17:57:03 2009 -0400
Report error when using conflicting method modifiers in Genie parser
---
vala/valagenieparser.vala | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/vala/valagenieparser.vala b/vala/valagenieparser.vala
index cef9324..3bca600 100644
--- a/vala/valagenieparser.vala
+++ b/vala/valagenieparser.vala
@@ -2663,6 +2663,11 @@ public class Vala.Genie.Parser : CodeVisitor {
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]