nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
typing: ensure monotony on literal arrays
[nit.git]
/
src
/
semantize
/
typing.nit
diff --git
a/src/semantize/typing.nit
b/src/semantize/typing.nit
index
212f43e
..
ba08e4d
100644
(file)
--- 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