From: Alexandre Terrasa Date: Thu, 7 Nov 2013 18:48:43 +0000 (-0500) Subject: nitg: fixes iterators crashes for test in 62cdb9a9633767baafb04f66fdad79a46d2e9a69 X-Git-Tag: v0.6.4~90^2 X-Git-Url: http://nitlanguage.org nitg: fixes iterators crashes for test in 62cdb9a9633767baafb04f66fdad79a46d2e9a69 Signed-off-by: Alexandre Terrasa --- diff --git a/src/typing.nit b/src/typing.nit index abf1597..57e4b6d 100644 --- a/src/typing.nit +++ b/src/typing.nit @@ -894,6 +894,10 @@ redef class AForExpr v.error(self, "Type Error: Expected method 'iterator' to return an Iterator of MapIterator type") return end + + # anchor formal and virtual types + if mtype.need_anchor then mtype = v.anchor_to(mtype) + self.coltype = mtype.as(MClassType) # get methods is_ok, next, item