Update tests for immutable variables

This commit is contained in:
Alex Beregszaszi 2020-08-28 19:06:34 +01:00
parent 56624af209
commit a80e2c1462
2 changed files with 3 additions and 6 deletions

View File

@ -4,7 +4,5 @@ contract C {
uint immutable y = 5;
}
// ----
// TypeError 1581: (62-63): 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): Immutable variables can only be initialized inline or assigned directly in the constructor.
// TypeError 1574: (66-67): Immutable state variable already initialized.
// TypeError 1581: (62-63): Cannot write to immutable here: Immutable variables can only be initialized inline or assigned directly in the constructor.
// TypeError 1581: (66-67): Cannot write to immutable here: Immutable variables can only be initialized inline or assigned directly in the constructor.

View File

@ -2,5 +2,4 @@ contract C {
int immutable x = x = 5;
}
// ----
// TypeError 1581: (35-36): Immutable variables can only be initialized inline or assigned directly in the constructor.
// TypeError 1574: (35-36): Immutable state variable already initialized.
// TypeError 1581: (35-36): Cannot write to immutable here: Immutable variables can only be initialized inline or assigned directly in the constructor.