From 0be560d8380a6e9a8b9d307ede109412cbdc55bd Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Fri, 26 Jun 2020 09:40:11 +0200 Subject: [PATCH] vala: Improve parameter check of "get" method meant to be used by foreach (2) Actually all integer-types as index parameter. --- vala/valaforeachstatement.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vala/valaforeachstatement.vala b/vala/valaforeachstatement.vala index c7fb6ee50..383814085 100644 --- a/vala/valaforeachstatement.vala +++ b/vala/valaforeachstatement.vala @@ -197,7 +197,7 @@ public class Vala.ForeachStatement : Block { return false; } unowned List parameters = get_method.get_parameters (); - if (parameters.size != 1 || !parameters[0].variable_type.compatible (context.analyzer.int_type)) { + if (parameters.size != 1 || !(parameters[0].variable_type is IntegerType)) { return false; } var size_property = collection_type.get_member ("size") as Property; -- 2.47.2