Question
ActionScript compiler warnings
Few days ago I found myself debugging the code which seems perfectly OK but doesnt work as expected. After some time I realized that my mistake was trivial:
If (some complex condition);
{
Do something.
}
Although this is perfectly correct ActionScript statement I think it should cause compiler warning.
I have reported a bug and submitted a patch adding warnings in following situations:
if (value == 1); //this should cause warning
{
trace("some code");
}
while(value > 0); //this should cause warning
{
trace("some code");
}
for (var i:int = 0; i < 10 ; i++ ); //this should cause warning
{
trace("some code");
}
https://bugs.adobe.com/jira/browse/ASC-3703
What is interesting 3 bugs in the framework can be found and instantly fixed after enabling these warnings.
Do you know any other common trivial mistakes which should cause compiler warnings?
Cheers,
Iwo Banas
If (some complex condition);
{
Do something.
}
Although this is perfectly correct ActionScript statement I think it should cause compiler warning.
I have reported a bug and submitted a patch adding warnings in following situations:
if (value == 1); //this should cause warning
{
trace("some code");
}
while(value > 0); //this should cause warning
{
trace("some code");
}
for (var i:int = 0; i < 10 ; i++ ); //this should cause warning
{
trace("some code");
}
https://bugs.adobe.com/jira/browse/ASC-3703
What is interesting 3 bugs in the framework can be found and instantly fixed after enabling these warnings.
Do you know any other common trivial mistakes which should cause compiler warnings?
Cheers,
Iwo Banas
