]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: Fix search for Parameter.base_parameter
authorRico Tzschichholz <ricotz@ubuntu.com>
Sun, 8 Mar 2020 09:41:16 +0000 (10:41 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 8 Mar 2020 09:41:16 +0000 (10:41 +0100)
vala/valaparameter.vala

index 052b06ce83a335aa4a4f88e8fdc80c31abad7378..f99f484dab506fee25ed16bec16a3320da98cb9f 100644 (file)
@@ -210,8 +210,13 @@ public class Vala.Parameter : Variable {
 
                unowned Method? m = parent_symbol as Method;
                if (m != null) {
-                       unowned Method? base_method = m.base_method != null ? m.base_method : m.base_interface_method;
-                       if (base_method != null && base_method != m) {
+                       unowned Method? base_method = null;
+                       if (m.base_method != null && m.base_method != m) {
+                               base_method = m.base_method;
+                       } else if (m.base_interface_method != null && m.base_interface_method != m) {
+                               base_method = m.base_interface_method;
+                       }
+                       if (base_method != null) {
                                int index = m.get_parameters ().index_of (this);
                                if (index >= 0) {
                                        base_parameter = base_method.get_parameters ().get (index);