Open itlancer opened 4 years ago
Hi
This is a compiler error then, i.e. the compiler should be picking up on this. Are you able to confirm whether it's the newer AS3 compiler (aka Falcon) that you're using, or is it the Flex compiler? In theory I think we can support updates to the newer compiler but we've not looked into that at all yet!
Would it help though if the error was more clear from the runtime? I'm a little surprised you don't get a VerifyError, with the message "xxx can't extend final class yyy" which is what the code seems to suggest should happen. Or actually, for a class (rather than a method) it should be:
@ajwfrost
I'm using "standard" AS3 compiler. I have downloaded "AIR SDK with new ActionScript Compiler" from https://airsdk.harman.com/download . But this issue exists also with AIR 32.0.0.89 and more earlier AIR versions (but with AIR 2.5 all fine). I didn't use Flex SDK at all. How can I check is it "new" (Falcon) or "old"?
I think you should not change run-time error message but handle such errors at compile-time and finish compilation with error.
So that would be the new/Falcon AS3 compiler, yes.
I agree it would be best to handle this at compile-time, but this is going to be lower priority as we've not done anything with the actual AS3 compiler to date so would need to bring in a Java expert to investigate..
thanks
Ok. It's not high priority but may be this ticket help someone before it will be fixed properly.
Problem Description
Extending final class cause ABC data corruption error at runtime but it must be handled as compile-time error according https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/compilerErrors.html This makes development and testing more difficult.
It has been tested with AIR 2.5 and multiple AIR versions from ~AIR 24 till latests AIR 32.0.0.89 and AIR 33.1.1.217 with many different Windows and macOS devices. It works fine only with AIR 2.5 (and seems older versions too). In latests AIR versions issue exists in all cases.
Steps to Reproduce
Compile and try to launch code below.
Application example with sources attached. extending_final_class_bug.zip
Actual Result: Code will be compiled and on launch throw run-time error:
Expected Result: Compile-time error 1016: Base class is final.
Known Workarounds
none *do not extending final classes