[vala] Improve error message for virtual/override/abstract class methods



commit 2832dd8fba7cf7b5fe62957a9970d8663cb3a82e
Author: Florian Brosch <flo brosch gmail com>
Date:   Mon Sep 15 01:25:38 2014 +0200

    Improve error message for virtual/override/abstract class methods

 vala/valaparser.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/vala/valaparser.vala b/vala/valaparser.vala
index 3a67021..247a85c 100644
--- a/vala/valaparser.vala
+++ b/vala/valaparser.vala
@@ -2675,7 +2675,7 @@ public class Vala.Parser : CodeVisitor {
                        if (ModifierFlags.ABSTRACT in flags
                            || ModifierFlags.VIRTUAL in flags
                            || ModifierFlags.OVERRIDE in flags) {
-                               throw new ParseError.SYNTAX (get_error ("the modifiers `abstract', `virtual', 
and `override' are not valid for static methods"));
+                               throw new ParseError.SYNTAX (get_error ("the modifiers `abstract', `virtual', 
and `override' are not valid for %s methods".printf ((ModifierFlags.CLASS in flags) ? "class" : "static")));
                        }
                }
 


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