mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Update tests for immutable variables
This commit is contained in:
parent
56624af209
commit
a80e2c1462
@ -4,7 +4,5 @@ contract C {
|
|||||||
uint immutable y = 5;
|
uint immutable y = 5;
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError 1581: (62-63): Immutable variables can only be initialized inline or assigned directly in the constructor.
|
// TypeError 1581: (62-63): Cannot write to immutable here: Immutable variables can only be initialized inline or assigned directly in the constructor.
|
||||||
// TypeError 1574: (62-63): Immutable state variable already initialized.
|
// TypeError 1581: (66-67): Cannot write to immutable here: Immutable variables can only be initialized inline or assigned directly in the constructor.
|
||||||
// TypeError 1581: (66-67): Immutable variables can only be initialized inline or assigned directly in the constructor.
|
|
||||||
// TypeError 1574: (66-67): Immutable state variable already initialized.
|
|
||||||
|
@ -2,5 +2,4 @@ contract C {
|
|||||||
int immutable x = x = 5;
|
int immutable x = x = 5;
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError 1581: (35-36): Immutable variables can only be initialized inline or assigned directly in the constructor.
|
// TypeError 1581: (35-36): Cannot write to immutable here: Immutable variables can only be initialized inline or assigned directly in the constructor.
|
||||||
// TypeError 1574: (35-36): Immutable state variable already initialized.
|
|
||||||
|
Loading…
Reference in New Issue
Block a user