Open themabus opened 2 years ago
switch (x > 0) {
case 0:
y++;
break;
}
like above - this can be decompiled on v0.3.0 - v0.3.5.8, but not on v0.4.0.4 or BleedingEdge:
/* EXCEPTION!
System.NotImplementedException: Unknown size for data type Boolean
at UndertaleModLib.Decompiler.Decompiler.GetTypeSize(DataType type) in D:\a\UndertaleModTool\UndertaleModTool\UndertaleModLib\Decompiler\Decompiler.cs:line 1919
at UndertaleModLib.Decompiler.Decompiler.DecompileFromBlock(DecompileContext context, Dictionary`2 blocks, Block block, List`1 tempvars, Stack`1 workQueue) in D:\a\UndertaleModTool\UndertaleModTool\UndertaleModLib\Decompiler\Decompiler.cs:line 2028
at UndertaleModLib.Decompiler.Decompiler.DecompileFromBlock(DecompileContext context, Dictionary`2 blocks, Block block) in D:\a\UndertaleModTool\UndertaleModTool\UndertaleModLib\Decompiler\Decompiler.cs:line 2618
at UndertaleModLib.Decompiler.Decompiler.Decompile(UndertaleCode code, GlobalDecompileContext globalContext) in D:\a\UndertaleModTool\UndertaleModTool\UndertaleModLib\Decompiler\Decompiler.cs:line 3769
at UndertaleModTool.UndertaleCodeEditor.<>c__DisplayClass31_1.<DecompileCode>b__1() in D:\a\UndertaleModTool\UndertaleModTool\UndertaleModTool\Editors\UndertaleCodeEditor.xaml.cs:line 456
*/
i hope this gets fixed sometime soon
Describe the bug
bitwise operation in Switch statement causes decompiler exception. happens in 674c5d8 and 0.4.0.4, was fine in 0.3.5.8
increment operation in Switch statement causes different kind of decompiler exception. happens in 674c5d8 and 0.4.0.4, was fine in 0.3.5.8
Reproducing steps
decompile script0/script1 from attached data.win bug_stack.zip
Setup Details
674c5d8 GMS 1.4.9999 Win10 x64