]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
generics-constraints: Make multiple constraints unsupported
authorLorenz Wildberg <lorenz@wild-fisch.de>
Thu, 18 May 2023 00:20:43 +0000 (02:20 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Wed, 31 Jan 2024 17:49:07 +0000 (18:49 +0100)
vala/valatypeparameter.vala

index 4754d35dda0177bd7ece906c5009d687bca18403..29db5df39453807268b1d4cb6131565d77c5cbba 100644 (file)
@@ -160,6 +160,10 @@ public class Vala.TypeParameter : TypeSymbol {
                        }
                }
 
+               if (type_constraint_list != null && type_constraint_list.size > 1) {
+                       Report.error (source_reference, "currently it is only supported to constrain a type parameter with one type");
+                       error = true;
+               }
                return !error;
        }
 }