Closed Hecate2 closed 1 month ago
Sorry for still having bugs... https://github.com/neo-project/neo-devpack-dotnet/pull/1096 https://github.com/Jim8y/neo-devpack-dotnet/blob/95a718cc2d10c3cc66b5b7a6c7587a82c0c91622/tests/Neo.Compiler.CSharp.TestContracts/Contract_TryCatch.cs#L101-L120 This method demonstrates the error of the optimizer in master. The optimizer deletes all the codes after finally because it visits the throw in catch, and then visits finally (without visiting codes after finally). Then when we do not throw in catch, the optimizer thinks finally has been visited well, and never visits the codes after finally.
UT Fault
Sorry for still having bugs... https://github.com/neo-project/neo-devpack-dotnet/pull/1096 https://github.com/Jim8y/neo-devpack-dotnet/blob/95a718cc2d10c3cc66b5b7a6c7587a82c0c91622/tests/Neo.Compiler.CSharp.TestContracts/Contract_TryCatch.cs#L101-L120 This method demonstrates the error of the optimizer in master. The optimizer deletes all the codes after finally because it visits the throw in catch, and then visits finally (without visiting codes after finally). Then when we do not throw in catch, the optimizer thinks finally has been visited well, and never visits the codes after finally.