summaryrefslogtreecommitdiff
path: root/vala
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2022-03-04 11:45:41 +0100
committerRico Tzschichholz <ricotz@ubuntu.com>2022-03-04 11:45:41 +0100
commitf058e9e828f494ebf8d60cabff7999f219048623 (patch)
tree9cb93e382e96a4a121cc5311bebd8c51137b8801 /vala
parent90d5814449865dc1b560a90b61c890de2e312528 (diff)
downloadvala-f058e9e828f494ebf8d60cabff7999f219048623.tar.gz
girparser: Don't count instance-parameter when checking for backwards closure reference
Fixes https://gitlab.gnome.org/GNOME/vala/issues/721
Diffstat (limited to 'vala')
-rw-r--r--vala/valagirparser.vala6
1 files changed, 4 insertions, 2 deletions
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 53d073926..355d0fa74 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -3469,11 +3469,13 @@ public class Vala.GirParser : CodeVisitor {
var current_parameter_idx = -1;
while (current_token == MarkupTokenType.START_ELEMENT) {
- current_parameter_idx++;
-
var is_instance_parameter = (reader.name == "instance-parameter"
&& !(symbol_type == "function" || symbol_type == "constructor"));
+ if (!is_instance_parameter) {
+ current_parameter_idx++;
+ }
+
if (instance_idx > -2 && instance_idx == current_parameter_idx) {
skip_element ();
continue;