greg-dove commented on issue #185:
URL: https://github.com/apache/royale-compiler/issues/185#issuecomment-859084299


   When you are doing this is it clear to the compiler that the ArrayList 
instance being targeted is strongly typed?
   
   So, for example, with the
   `this.someOtherObject.someArrayList`
   in:
   `for each (var thing:SomeObject in this.someOtherObject.someArrayList)`
   
   is `this.someOtherObject ` a strongly typed member, where it's type has a 
strongly typed member named 'someArrayList' which is typed as ArrayList (or 
iirc the interface behind ArrayList is supported as well).
   
   Why I ask: If there is any untyped (e.g. public var someOtherObject:Object) 
path to the for each target, then the compiler cannot know to apply the rules 
for iteration over ArrayList.
   
   If the above is happening, you could perhaps try the following hard casting:
   `for each (var thing:SomeObject in 
ArrayList(this.someOtherObject.someArrayList))`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to