[vala/0.40] vala: Fix search for Parameter.base_parameter
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.40] vala: Fix search for Parameter.base_parameter
- Date: Tue, 24 Mar 2020 09:46:20 +0000 (UTC)
commit 7cac0440ace73d1954709c42b1c3c9bb76636ab2
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 0b54aab41..70bf20528 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]