[vala] Report error on invalid creation method declarations
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [vala] Report error on invalid creation method declarations
- Date: Sun, 16 Aug 2009 19:15:40 +0000 (UTC)
commit 608ace9833e7c60c30d3a4c201bec9f77295af12
Author: Jürg Billeter <j bitron ch>
Date: Sun Aug 16 21:14:36 2009 +0200
Report error on invalid creation method declarations
Fixes bug 572060.
vala/valaparser.vala | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/vala/valaparser.vala b/vala/valaparser.vala
index d41d1b7..f6c9d6f 100644
--- a/vala/valaparser.vala
+++ b/vala/valaparser.vala
@@ -2834,6 +2834,11 @@ public class Vala.Parser : CodeVisitor {
if (ModifierFlags.EXTERN in flags) {
method.external = true;
}
+ if (ModifierFlags.ABSTRACT in flags
+ || ModifierFlags.VIRTUAL in flags
+ || ModifierFlags.OVERRIDE in flags) {
+ Report.error (method.source_reference, "abstract, virtual, and override modifiers are not applicable to creation methods");
+ }
expect (TokenType.OPEN_PARENS);
if (current () != TokenType.CLOSE_PARENS) {
do {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]