diff options
author | Marvin W <git@larma.de> | 2017-03-20 18:50:06 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2017-03-20 20:49:06 +0100 |
commit | c0ff1adfb3c96c2effddadbae441ab2a81cb0751 (patch) | |
tree | b904f6e60b63a07fc09a6d9c5ab96f5b98e1264f /vala | |
parent | 4382077dcf09cf9bbf315d0c56579118ce34b503 (diff) | |
download | vala-c0ff1adfb3c96c2effddadbae441ab2a81cb0751.tar.gz |
method: Always consider compatible with itself
This is even the case with unresolved types.
https://bugzilla.gnome.org/show_bug.cgi?id=773135
Diffstat (limited to 'vala')
-rw-r--r-- | vala/valamethod.vala | 6 |
1 files changed, 6 insertions, 0 deletions
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; |