JPEXS Free Flash Decompiler Issue Tracker

If you are looking for the decompiler itself, visit https://github.com/jindrapetrik/jpexs-decompiler

NEW : We have got a new blog where we post some interesting SWF internals info.

List of issuesList of issues

#2498 Traits with nonempty public namespaces should be distinguishable
Author:
Date created:
Type: bug
Visibility: Everybody
Assigned to:
Labels: AS3
State: upgraded Help

> What steps will reproduce the problem? Compile following AS3 code: ``` package { import flash.display.Sprite; public class Main extends Sprite { public var a:int = 1; public var b:int = 2; public function Main() { super(); trace("ns1 = " + this.a); trace("ns2 = " + this.b); } } } ``` Then rename trait "a" (and its usage) in P-code editor to QName(PackageNamespace("test1"),"a") and trait "b" to QName(PackageNamespace("test2"),"a"), so they have same name, different namespace. > What is the expected output? What do you see instead? I see ``` package { import flash.display.Sprite; import test1.a; import test2.a; public class Main extends Sprite { public var a:int = 1; //This one is not distinguishable from the second one public var a:int = 2; public function Main() { super(); trace("ns1 = " + this.test1.a); //the usages are weird, does not tell whether test1 is ns or attribute name trace("ns2 = " + this.test2.a); } } } ``` This code is not compilable in either standard compiler or in FFDec. I would expect some FFDec syntax that ensures: a) namespace of the trait definition is shown b) namespace of the trait usage is shown c) both trait definition and its usage need to be compilable in FFDec to the same source code as it was before > What version of the product are you using? Is it "nightly build"? Which operating system do you have? 24.0.1 nightly 3267, Windows 11 > Please provide any additional information below. If the problem is related to a SWF file, attach it here, otherwise we can't help you. Attaching sample SWF file.
Downloadnstest.swf (313 B)
This is fixed in nightly 3268. I used the same syntax as for colliding private namespacec - #xx suffix. Current result: ``` package { import flash.display.Sprite; import test1.a; import test2.a; public class Main extends Sprite { public var a#5:int = 1; public var a#6:int = 2; public function Main() { super(); trace("ns1 = " + this.a#5); trace("ns2 = " + this.a#6); } } } ``` The only bad thing left are the imports, they should not be there, probably.
State: new→opened
In nightly 3269, the imports are not there anymore.
State: opened→upgraded