Open zxzzhange opened 7 months ago
This has been a pretty standard test for some time - are you using eclipse by any chance?
Please post bytecode
Thanks
On Fri, 26 Apr 2024, 08:47 zxzzhange, @.***> wrote:
CFR version
CFR 0.151 Compiler
source :
public class Test {
public enum TestEnums { A, B, C }
public void test(TestEnums testEnum) { switch (testEnum) { case A: System.out.println("is A"); break; case B: System.out.println("is B"); break; case C: System.out.println("is D"); break; default: System.out.println("is default"); break; } }
}
decompiler result:
public class Test { public void test(TestEnums testEnums) { switch (1.$SwitchMap$com$seeyon$analysis$driver$Test$TestEnums[testEnums.ordinal()]) { case 1: { System.out.println("is A"); break; } case 2: { System.out.println("is B"); break; } case 3: { System.out.println("is D"); break; } default: { System.out.println("is default"); } } } } Description
$SwitchMap This compilation is not accurate Example
— Reply to this email directly, view it on GitHub https://github.com/leibnitz27/cfr/issues/356, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFXCEDHQWHO4WX5QGMQCBTY7IBB3AVCNFSM6AAAAABG2JFN4CVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI3DKMJXGI4DSOI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
CFR version
CFR 0.151
Compiler
source :
public class Test {
}
decompiler result:
public class Test { public void test(TestEnums testEnums) { switch (1.$SwitchMap$com$seeyon$analysis$driver$Test$TestEnums[testEnums.ordinal()]) { case 1: { System.out.println("is A"); break; } case 2: { System.out.println("is B"); break; } case 3: { System.out.println("is D"); break; } default: { System.out.println("is default"); } } } }
Description
$SwitchMap This compilation is not accurate
Example