hyperledger / solang

Solidity Compiler for Solana and Polkadot
https://solang.readthedocs.io/
Apache License 2.0
1.23k stars 206 forks source link

Each call to new_scope() should be matched with leave_scope() #1562

Closed seanyoung closed 9 months ago

seanyoung commented 9 months ago

The try catch blocks had an additional new_scope() which is incorrect. I think the extra scope is harmless but let's clean it up.

Rename new_scope() to enter_scope() as this matches leave_scope() better.

codecov[bot] commented 9 months ago

Codecov Report

Merging #1562 (4d13c4b) into main (a9e20d3) will increase coverage by 0.00%. Report is 1 commits behind head on main. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1562   +/-   ##
=======================================
  Coverage   87.35%   87.36%           
=======================================
  Files         133      133           
  Lines       64126    64125    -1     
=======================================
+ Hits        56019    56021    +2     
+ Misses       8107     8104    -3     
Files Coverage Δ
src/codegen/statements/mod.rs 96.77% <100.00%> (ø)
src/codegen/yul/statements.rs 98.13% <100.00%> (ø)
src/sema/statements.rs 93.80% <100.00%> (-0.01%) :arrow_down:
src/sema/symtable.rs 92.70% <100.00%> (ø)
src/sema/yul/block.rs 100.00% <100.00%> (ø)
src/sema/yul/for_loop.rs 95.14% <100.00%> (ø)
src/sema/yul/functions.rs 84.40% <100.00%> (ø)
src/sema/yul/mod.rs 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes