]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Pass pointer of matching type to property-getter
authorRico Tzschichholz <ricotz@ubuntu.com>
Sat, 25 Feb 2017 12:07:11 +0000 (13:07 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sat, 25 Feb 2017 12:20:52 +0000 (13:20 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=777958

codegen/valaccodebasemodule.vala

index 880e8a2d0e161f122d67b067df6c45dca7233a67..95128956266f4e55366857153ab52c032eddab8e 100644 (file)
@@ -1782,7 +1782,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                                if (get_accessor != null) {
                                        var property_type = prop.property_type;
                                        var get_call = new CCodeFunctionCall (new CCodeIdentifier (get_ccode_real_name (get_accessor)));
-                                       get_call.add_argument (new CCodeIdentifier ("self"));
+                                       get_call.add_argument (new CCodeIdentifier (is_virtual ? "base" : "self"));
 
                                        if (property_type is ArrayType) {
                                                ccode.add_declaration ("int", new CCodeVariableDeclarator ("old_value_length"));