But why data type changes before second statement gets hit? On Mon, Apr 27, 2015 at 12:15 PM, OmPrakash Muppirala <bigosma...@gmail.com> wrote:
> In the second case, the definition of the class someVO will be included in > the compiled swf, because it appears in the code. > > In the first case, the compiler has no knowledge that someVO would be > used. > > Just declaring a dummy object of type someVO at the top of the class would > ensure that the compiler includes that class definition in the swf. > > Thanks, > Om > On Apr 27, 2015 9:55 AM, "mark goldin" <markzolo...@gmail.com> wrote: > > > I have the following code: > > public function result(data:Object):void > > { > > // Check data.result > > trace(data.result[0]); I see data type Object > > // but if I add this code: > > trace(data.result[0] as someVO); then at the first trace I see data > > type as of someVO > > } > > > > How can run time know that I am about to cast data? > > > > Thanks > > >