mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
just added some examples in breaking-changes.rst
This commit is contained in:
parent
cc7a14a61d
commit
352d592d59
@ -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.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user