Closed Hecate2 closed 1 month ago
With respect to the variable throwed in https://github.com/neo-project/neo-devpack-dotnet/blob/958b63d1e534247240245143187c46224f74d54f/src/Neo.Compiler.CSharp/Optimizer/Analysers/InstructionCoverage.cs#L147 Here we have a throwed in each basic block context. In other words, only a single throwed state is available in a single recursive call. If we represent whether Exception had been with a single variable bool throwed, we may face trouble in a try nested in a finally:
throwed
bool throwed
try{throw ...} // no catch finally { try {do_something();} }
In do_something(), the variable throwed is true because we throwed from the outer try. But nothing had been throwed in the inner try.
do_something()
true
This has been fixed in https://github.com/neo-project/neo-devpack-dotnet/pull/1102/commits/c0a0eefc4ba929384c87385d76659a4ccfd7b8c5 in https://github.com/neo-project/neo-devpack-dotnet/pull/1102
With respect to the variable
throwed
in https://github.com/neo-project/neo-devpack-dotnet/blob/958b63d1e534247240245143187c46224f74d54f/src/Neo.Compiler.CSharp/Optimizer/Analysers/InstructionCoverage.cs#L147 Here we have athrowed
in each basic block context. In other words, only a singlethrowed
state is available in a single recursive call. If we represent whether Exception had been with a single variablebool throwed
, we may face trouble in a try nested in a finally:In
do_something()
, the variablethrowed
istrue
because we throwed from the outer try. But nothing had been throwed in the inner try.This has been fixed in https://github.com/neo-project/neo-devpack-dotnet/pull/1102/commits/c0a0eefc4ba929384c87385d76659a4ccfd7b8c5 in https://github.com/neo-project/neo-devpack-dotnet/pull/1102