[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Swftools-common] Invalid reference produces warning, not error
From: |
Matthias Kramm |
Subject: |
Re: [Swftools-common] Invalid reference produces warning, not error |
Date: |
Sat, 4 Jul 2009 00:21:20 +0200 |
User-agent: |
Mutt/1.5.6i |
On Thu, Jul 02, 2009 at 02:13:46PM +0100, Matthew Ayres <address@hidden> wrote:
> In its default mode as3compile (swftools 0.9.0) produces no messages
> regarding this line of code.
>
> In verbose mode it reports:
> VirtualZoo.as:10:12: warning: Resolving eatt on unknown type
> VirtualZoo.as:11:11: warning: Resolving eat on unknown type
ActionScript is tricky for a compiler, because there
are circumstances where it *cannot* know which object
you're working on.
Consider this code:
var o:Object;
if(Math.random()<0.5)
o.member = new String()
else
o.member = new Matrix3D()
o.member.transpose();
There's no way of telllng whether "o.member" is
a String or a Matrix3D, and hence, whether it'll
have the transpose() method or not.
Matthias