]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Report error when overriding method with static method
authorJürg Billeter <j@bitron.ch>
Sun, 2 Aug 2009 17:51:34 +0000 (19:51 +0200)
committerJürg Billeter <j@bitron.ch>
Sun, 2 Aug 2009 17:53:56 +0000 (19:53 +0200)
vala/valamethod.vala

index 88d4e21c78b41fb448a97b9e001d261c3330dffa..bd3a5dac037ae7cf9521f4658e85060c73e24b22 100644 (file)
@@ -421,6 +421,11 @@ public class Vala.Method : Member {
         * @return true if the specified method is compatible to this method
         */
        public bool compatible (Method base_method, out string? invalid_match) {
+               if (binding != base_method.binding) {
+                       invalid_match = "incompatible binding";
+                       return false;
+               }
+
                ObjectType object_type = null;
                if (parent_symbol is ObjectTypeSymbol) {
                        object_type = new ObjectType ((ObjectTypeSymbol) parent_symbol);