just added some examples in breaking-changes.rst

This commit is contained in:
Kayleexx 2023-09-21 17:02:03 +05:30
parent cc7a14a61d
commit 352d592d59

View File

@ -232,8 +232,37 @@ Variables
* Declaring empty structs is now disallowed for clarity.
**Before v0.5.0 (Valid):**
```solidity
struct EmptyStruct {} // Allowed in older versions
```
**v0.5.0 and Later (Disallowed):**
```solidity
struct EmptyStruct {} // Disallowed
```
* The ``var`` keyword is now disallowed to favor explicitness.
**Before v0.5.0 (Valid):**
```solidity
function example() {
var x = 42; // Allowed in older versions
}
```
**v0.5.0 and Later (Disallowed):**
```solidity
function example() {
var x = 42; // Disallowed
}
```
* Assignments between tuples with different number of components is now
disallowed.