From: Jean Privat Date: Sat, 11 Apr 2015 17:06:45 +0000 (+0700) Subject: typing: ensure monotony on literal arrays X-Git-Tag: v0.7.4~26^2~8 X-Git-Url: http://nitlanguage.org typing: ensure monotony on literal arrays Signed-off-by: Jean Privat --- diff --git a/src/semantize/typing.nit b/src/semantize/typing.nit index 212f43e..ba08e4d 100644 --- a/src/semantize/typing.nit +++ b/src/semantize/typing.nit @@ -1334,6 +1334,8 @@ redef class AArrayExpr end end if mtype == null then + # Ensure monotony for type adaptation on loops + if self.element_mtype != null then mtypes.add self.element_mtype mtype = v.merge_types(self, mtypes) end if mtype == null or mtype isa MNullType then