From: Jürg Billeter Date: Sun, 2 Aug 2009 17:51:34 +0000 (+0200) Subject: Report error when overriding method with static method X-Git-Tag: 0.7.5~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37f9e472bf975e541988e94e6c70fde8646c749c;p=thirdparty%2Fvala.git Report error when overriding method with static method --- diff --git a/vala/valamethod.vala b/vala/valamethod.vala index 88d4e21c7..bd3a5dac0 100644 --- a/vala/valamethod.vala +++ b/vala/valamethod.vala @@ -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);