Code has been added to clipboard!

Scoping and Declaration in Solidity

Example
pragma solidity >=0.5.0 <0.7.0;
contract C {
    function minimalScoping() pure public {
        {
            uint same;
            same = 1;
        }

        {
            uint same;
            same = 3;
        }
    }
}