Skip to content

Commit

Permalink
Merge pull request #9696 from ethereum/immutable-tests
Browse files Browse the repository at this point in the history
Update tests for immutable variables
  • Loading branch information
axic authored Aug 28, 2020
2 parents 56624af + a80e2c1 commit 98cc1d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit 98cc1d9

Please sign in to comment.