]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Consider unowned and owned types equivalent if they are not disposable
authorJürg Billeter <j@bitron.ch>
Sat, 16 Oct 2010 07:38:05 +0000 (09:38 +0200)
committerJürg Billeter <j@bitron.ch>
Sat, 16 Oct 2010 07:38:05 +0000 (09:38 +0200)
Fixes bug 631920.

vala/valadatatype.vala

index aa838d1e346f401ca4bc8ae7aa322e2372023d1c..2eccdd54a981a2402661403d94e11ff0c83e5164 100644 (file)
@@ -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;
                }