Skip to content

Latest commit

 

History

History
22 lines (19 loc) · 853 Bytes

solc 0.7.0 Breaking.md

File metadata and controls

22 lines (19 loc) · 853 Bytes

Solidity v0.7.0 Breaking Semantic Changes - changes where existing code changes its behaviour without the compiler notifying you about it:

Exponentiation and shifts of literals by non-literals (e.g. 1 << x or 2 ** x) will always use either the type uint256 (for non-negative literals) or int256 (for negative literals) to perform the operation.

Previously, the operation was performed in the type of the shift amount / the exponent which can be misleading.


Slide Screenshot

139.jpg


Slide Text

  • Breaking Semantic Changes
  • Exponentation & Shfits
  • Literals by Non-literals
  • Earlier -> Type of shift/exponent
  • Now -> uint256 or int256

References


Tags