From: Jürg Billeter Date: Sat, 16 Oct 2010 07:38:05 +0000 (+0200) Subject: Consider unowned and owned types equivalent if they are not disposable X-Git-Tag: 0.11.1~103 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2edd63ce1785bf080d2ee1fe2d0703eb180363dd;p=thirdparty%2Fvala.git Consider unowned and owned types equivalent if they are not disposable Fixes bug 631920. --- diff --git a/vala/valadatatype.vala b/vala/valadatatype.vala index aa838d1e3..2eccdd54a 100644 --- a/vala/valadatatype.vala +++ b/vala/valadatatype.vala @@ -235,7 +235,7 @@ public abstract class Vala.DataType : CodeNode { * otherwise */ public virtual bool equals (DataType type2) { - if (type2.value_owned != value_owned) { + if (type2.is_disposable () != is_disposable ()) { return false; } if (type2.nullable != nullable) { @@ -267,7 +267,7 @@ public abstract class Vala.DataType : CodeNode { * @return true if this type reference is stricter or equal */ public virtual bool stricter (DataType type2) { - if (type2.value_owned != value_owned) { + if (type2.is_disposable () != is_disposable ()) { return false; }