]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: Check type-arguments in more declarations
authorRico Tzschichholz <ricotz@ubuntu.com>
Sat, 8 Apr 2023 17:30:33 +0000 (19:30 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Tue, 11 Apr 2023 11:44:44 +0000 (13:44 +0200)
vala/valadelegate.vala
vala/valafield.vala
vala/valalocalvariable.vala
vala/valamethod.vala
vala/valaparameter.vala
vala/valaproperty.vala
vala/valasignal.vala

index 97d61c0109114ec5531437dfaaa97c3225ebb88c..e7ec720a25aab4c87b3cc5bff42d1803f4385c72 100644 (file)
@@ -321,9 +321,7 @@ public class Vala.Delegate : TypeSymbol, Callable, GenericSymbol {
                return_type.check (context);
                if (!external_package) {
                        context.analyzer.check_type (return_type);
-                       if (return_type is DelegateType) {
-                               return_type.check_type_arguments (context);
-                       }
+                       return_type.check_type_arguments (context, !(return_type is DelegateType));
                }
 
                if (return_type.type_symbol == context.analyzer.va_list_type.type_symbol) {
index 566a68b12400a3da96771ce5853be26f9d1fd600..dbe8176e8c948719c307e849f3b26a7c7a6117df 100644 (file)
@@ -112,6 +112,7 @@ public class Vala.Field : Variable, Lockable {
                variable_type.check (context);
                if (!external_package) {
                        context.analyzer.check_type (variable_type);
+                       variable_type.check_type_arguments (context, true);
 
                        // check symbol availability
                        if (variable_type.type_symbol != null) {
index 7fbde469f2d8926964da2678da81f49846db1d17..cbe612254cf270015f8ea2abfa7c89295302f8f0 100644 (file)
@@ -105,6 +105,7 @@ public class Vala.LocalVariable : Variable {
                        }
                        if (!external_package) {
                                context.analyzer.check_type (variable_type);
+                               variable_type.check_type_arguments (context, true);
                        }
                }
 
index 76dcbb5d34ea2d474f1b1e3ebc416e5e8824dc81..0814565c8faf122ee490aa6d299dd68368db8029 100644 (file)
@@ -866,9 +866,7 @@ public class Vala.Method : Subroutine, Callable, GenericSymbol {
                return_type.check (context);
                if (!external_package) {
                        context.analyzer.check_type (return_type);
-                       if (return_type is DelegateType) {
-                               return_type.check_type_arguments (context);
-                       }
+                       return_type.check_type_arguments (context, !(return_type is DelegateType));
                }
 
                if (return_type.type_symbol == context.analyzer.va_list_type.type_symbol) {
index fb68ab069d15d0bf9e924b8ec49c1fe40e4b259f..ef27b4cd2f1119eda234be2f818d55e8efe90a86 100644 (file)
@@ -208,9 +208,7 @@ public class Vala.Parameter : Variable {
                if (!ellipsis) {
                        if (!external_package) {
                                context.analyzer.check_type (variable_type);
-                               if (variable_type is DelegateType) {
-                                       variable_type.check_type_arguments (context);
-                               }
+                               variable_type.check_type_arguments (context, !(variable_type is DelegateType));
 
                                // check symbol availability
                                if ((parent_symbol == null || !parent_symbol.external_package) && variable_type.type_symbol != null) {
index fac24d53d1e9ee3556609ad7171cad986c9a7b5b..9963d19ffa4bf34fa78c0a93346f4ef72fd2e1ba 100644 (file)
@@ -493,6 +493,7 @@ public class Vala.Property : Symbol, Lockable {
                property_type.check (context);
                if (!external_package) {
                        context.analyzer.check_type (property_type);
+                       property_type.check_type_arguments (context, true);
                }
 
                if (get_accessor == null && set_accessor == null) {
index 2b5005e3b2897dba2505e7576fd96ab0f96cd9db..9eb7c894c61eebeac3db2c798d7ccd867c2bd109 100644 (file)
@@ -208,9 +208,7 @@ public class Vala.Signal : Symbol, Callable {
                return_type.check (context);
                if (!external_package) {
                        context.analyzer.check_type (return_type);
-                       if (return_type is DelegateType) {
-                               return_type.check_type_arguments (context);
-                       }
+                       return_type.check_type_arguments (context, !(return_type is DelegateType));
                }
 
                if (return_type.type_symbol == context.analyzer.va_list_type.type_symbol) {