I work for a company that develops both Mobile (C# with Unity) and Facebook (AS3 with Flashbuilder) apps. To my knowledge, everyone is using the same versions of the IDEs and SDKs associated. I have now encountered 2 separate errors that only I get and nobody else (a team of about 30) get.
First error, we had couple of functions in our C# code that were translated to AS3. C# allows overloaded functions, while AS3 does not, so when we ported to AS3, we had to pick one of the following:
Object.SetMidposition(float x, float y);
Object.SetMidposition(Point point);
got translated into AS3 as:
Object.SetMidposition(x:Number, y:Number)
However, there were a couple of spots in our code base where the translation missed converting the Point to an x,y pair, so we had a call where it was trying to Object.SetMidposition(Point) when it was looking for (x,y). This should have errored out for everyone, but for some reason only errored out for me. I have no idea why it only broke for me, and no one else.
Second error, a developer made an if statement with an XOR comparison:
if(boolA ^ boolB)
{
//Do stuff
}
I looked up the ^ operator, and it is indeed an XOR, and this should work. And it does! For everyone except me. In my environment, I get an error at this line saying that I cannot implicitly convert booleans to Numbers. I have no idea why it thinks I am trying to convert booleans to Numbers, or why I am the only one who is having this issue.
So an error that should have broke everyone, but only broke me, and another error that should not break anyone, but breaks me.
What gives? Thanks in advance.
In FB, under Project Properties > Flex Compiler, if "Enable strict type checking" and "Enable warnings" are checked I get the "implicit coercion.." error with the XOR comparison. Unchecking those suppresses the error. My preference is to enable the type checking and warnings – but I have a low tolerance for silly bugs 😃
I couldn't follow the other issue you mention.
var boolA:Boolean = true;
var boolB:Boolean = false;
if(boolA ^ boolB)
{
trace("bingo");
}