mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #11208 from paulrberg/develop
docs: mention the v0.8 restrictions on negative unary
This commit is contained in:
commit
722c878ccc
@ -146,6 +146,8 @@ This section lists changes that might cause existing contracts to not compile an
|
||||
|
||||
* The ``chainid`` builtin in inline assembly is now considered ``view`` instead of ``pure``.
|
||||
|
||||
* Unary negation cannot be used on unsigned integers anymore, only on signed integers.
|
||||
|
||||
Interface Changes
|
||||
=================
|
||||
|
||||
@ -170,4 +172,5 @@ How to update your code
|
||||
- Combine ``c.f{gas: 10000}{value: 1}()`` to ``c.f{gas: 10000, value: 1}()``.
|
||||
- Change ``msg.sender.transfer(x)`` to ``payable(msg.sender).transfer(x)`` or use a stored variable of ``address payable`` type.
|
||||
- Change ``x**y**z`` to ``(x**y)**z``.
|
||||
- Use inline assembly as a replacement for ``log0``, ..., ``log4``.
|
||||
- Use inline assembly as a replacement for ``log0``, ..., ``log4``.
|
||||
- Negate unsigned integers by subtracting them from the maximum value of the type and adding 1 (e.g. ``type(uint256).max - x + 1``, while ensuring that `x` is not zero)
|
||||
|
Loading…
Reference in New Issue
Block a user