Files
solidity/docs
Braden Watling 6fe1ee6a8a Fix typo in control-structures.rst
I'm learning Solidity by reading these docs and found this statement confusing. I'm fairly certain that the correct description here is that the *callee* changes get reverted, but the caller is able to react to the failures.

I tested this with the following snippet in Remix, which resulted in a successful transaction when deployed:

```
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.7;

contract A {
    uint public value;

    function a(uint newValue, bool shouldRevert) external {
        value = newValue;
        if (shouldRevert) {
            revert();
        }
    }
}

contract B {
    function b() external {
        A a = new A();
        try a.a(50, false) {
            assert(a.value() == 50);
        } catch {
            assert(false);
        }
        a = new A();
        try a.a(50, true) {
            assert(false);
        } catch {
            assert(a.value() == 0);
        }
    }
}
```
2022-01-03 17:22:23 -05:00
..
2021-10-14 15:09:18 +02:00
2021-12-01 16:23:26 +01:00
2022-01-03 12:47:51 +05:30
2021-12-13 11:36:07 +01:00
2021-12-20 13:15:58 +01:00
2021-07-15 10:13:30 +02:00
2021-03-30 23:04:32 +02:00
2015-12-07 22:35:51 +01:00
2021-08-11 10:59:02 +02:00
2021-10-26 11:30:30 +02:00
2021-10-26 11:30:30 +02:00