[vala/0.46] vala: Fix search for Parameter.base_parameter



commit 6069821d9e6bbc1994b0146d21be974d3f3a6306
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sun Mar 8 10:41:16 2020 +0100

    vala: Fix search for Parameter.base_parameter

 vala/valaparameter.vala | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/vala/valaparameter.vala b/vala/valaparameter.vala
index 25fe9f4c0..1c4ad30d8 100644
--- a/vala/valaparameter.vala
+++ b/vala/valaparameter.vala
@@ -206,8 +206,13 @@ public class Vala.Parameter : Variable {
 
                var m = parent_symbol as Method;
                if (m != null) {
-                       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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]