scoping.sol 241 B

12345678910111213
  1. contract Foo {
  2. function foo() public {
  3. // new block is introduced with { and ends with }
  4. {
  5. uint256 a;
  6. a = 102;
  7. }
  8. // ERROR: a is out of scope
  9. // uint256 b = a + 5;
  10. }
  11. }