From: Rico Tzschichholz Date: Tue, 8 Aug 2023 05:59:09 +0000 (+0200) Subject: Don't override inferred type-arguments with type-constraint X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30fd9b50b9eab90d8fa248f33c8d7c5c17cc6936;p=thirdparty%2Fvala.git Don't override inferred type-arguments with type-constraint --- diff --git a/vala/valamethodcall.vala b/vala/valamethodcall.vala index e56b614c4..006247936 100644 --- a/vala/valamethodcall.vala +++ b/vala/valamethodcall.vala @@ -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; }