]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Don't override inferred type-arguments with type-constraint
authorRico Tzschichholz <ricotz@ubuntu.com>
Tue, 8 Aug 2023 05:59:09 +0000 (07:59 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 21 Apr 2024 11:46:27 +0000 (13:46 +0200)
vala/valamethodcall.vala

index e56b614c478956f7671aea9d988682ff93ef917d..0062479369a643fd8e2f11302de2fd17fa0c5e4d 100644 (file)
@@ -614,7 +614,7 @@ public class Vala.MethodCall : Expression, CallableExpression {
                                                }
 
                                                DataType? ct = type_param.get_constrained_type ();
-                                               if (ct != null) {
+                                               if (type_arg == null && ct != null) {
                                                        Report.notice (source_reference, "`%s' requires type arguments, constraining `%s' to `%s'", m.to_string (), type_param.name, ct.to_qualified_string ());
                                                        type_arg = ct;
                                                }