From: Marvin W Date: Mon, 20 Mar 2017 17:50:06 +0000 (+0100) Subject: method: Always consider compatible with itself X-Git-Tag: 0.36.1~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c0ff1adfb3c96c2effddadbae441ab2a81cb0751;p=thirdparty%2Fvala.git method: Always consider compatible with itself This is even the case with unresolved types. https://bugzilla.gnome.org/show_bug.cgi?id=773135 --- diff --git a/vala/valamethod.vala b/vala/valamethod.vala index f79ec7b5e..878946890 100644 --- a/vala/valamethod.vala +++ b/vala/valamethod.vala @@ -307,6 +307,12 @@ public class Vala.Method : Subroutine, Callable { * @return true if the specified method is compatible to this method */ public bool compatible (Method base_method, out string? invalid_match) { + // method is always compatible to itself + if (this == base_method) { + invalid_match = null; + return true; + } + if (binding != base_method.binding) { invalid_match = "incompatible binding"; return false;