nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
975ad30
)
typing: ensure monotony on literal arrays
author
Jean Privat
<jean@pryen.org>
Sat, 11 Apr 2015 17:06:45 +0000
(
00:06
+0700)
committer
Jean Privat
<jean@pryen.org>
Sat, 11 Apr 2015 17:06:45 +0000
(
00:06
+0700)
Signed-off-by: Jean Privat <jean@pryen.org>
src/semantize/typing.nit
patch
|
blob
|
history
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
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
mtype = v.merge_types(self, mtypes)
end
if mtype == null or mtype isa MNullType then