From: Rico Tzschichholz Date: Sun, 17 Nov 2019 11:49:11 +0000 (+0100) Subject: vala: Check "this_parameter" if available X-Git-Tag: 0.47.2~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49a6d475052ec476140c545a26ac8d5abe35c849;p=thirdparty%2Fvala.git vala: Check "this_parameter" if available --- diff --git a/vala/valaconstructor.vala b/vala/valaconstructor.vala index 0aee16ac8..a4844c728 100644 --- a/vala/valaconstructor.vala +++ b/vala/valaconstructor.vala @@ -67,6 +67,10 @@ public class Vala.Constructor : Subroutine { checked = true; + if (this_parameter != null) { + this_parameter.check (context); + } + context.analyzer.current_symbol = this; if (body != null) { diff --git a/vala/valacreationmethod.vala b/vala/valacreationmethod.vala index 48f301ddf..5969fd398 100644 --- a/vala/valacreationmethod.vala +++ b/vala/valacreationmethod.vala @@ -93,6 +93,10 @@ public class Vala.CreationMethod : Method { return false; } + if (this_parameter != null) { + this_parameter.check (context); + } + var old_source_file = context.analyzer.current_source_file; var old_symbol = context.analyzer.current_symbol; diff --git a/vala/valadestructor.vala b/vala/valadestructor.vala index 33d1f1a2c..61797ea22 100644 --- a/vala/valadestructor.vala +++ b/vala/valadestructor.vala @@ -67,6 +67,10 @@ public class Vala.Destructor : Subroutine { checked = true; + if (this_parameter != null) { + this_parameter.check (context); + } + context.analyzer.current_symbol = this; if (body != null) { diff --git a/vala/valamethod.vala b/vala/valamethod.vala index 4e288a210..4af74c759 100644 --- a/vala/valamethod.vala +++ b/vala/valamethod.vala @@ -704,6 +704,10 @@ public class Vala.Method : Subroutine, Callable { checked = true; + if (this_parameter != null) { + this_parameter.check (context); + } + if (get_attribute ("DestroysInstance") != null) { this_parameter.variable_type.value_owned = true; } diff --git a/vala/valaproperty.vala b/vala/valaproperty.vala index f9cf4d916..759735715 100644 --- a/vala/valaproperty.vala +++ b/vala/valaproperty.vala @@ -408,6 +408,10 @@ public class Vala.Property : Symbol, Lockable { checked = true; + if (this_parameter != null) { + this_parameter.check (context); + } + if (parent_symbol is Class && (is_abstract || is_virtual)) { var cl = (Class) parent_symbol; if (cl.is_compact && cl.base_class != null) {